Increase javax.obex performance
When a file is transferred over OBEX the javax.obex classes allocate the same amount of memory multiple times simply to copy the same data around internally, only to throw those allocations away when the next data block is processed. In the Bluetooth OPP case that meant that 64Kb was allocated around 15 times for every 64Kb transferred. Since the transfer speed is around 1.3Mbps that means almost 2.5Mb of memory is garbage collected every second, increasing the time needed for each block transfer. Fixed by keeping data in reusable byte buffer objects instead. The time to transfer a 39MB file is reduced by about 10-20%. Change-Id: I182c0374c2915d1b37ca12200fb36de57dabc67e
Loading
Please register or sign in to comment