Opened 12 years ago

Closed 12 years ago

#4040 closed enhancement (fixed)

[patch][ccla]batch API for gears to improve performance

Reported by: Adam Peller Owned by: bradneuberg
Priority: high Milestone:
Component: Dojox Version: 0.9
Keywords: Cc: Tom Trenka, jcerruti@…
Blocked By: Blocking:

Description

Julian produced a patch that implements get/put Multiple methods much like he did for dojox.storage. Crossing the native boundary fewer times seems to have a huge performance impact, as well as the potential to avoid extra expensive sql operations.

Attachments (1)

gears.diff (7.8 KB) - added by Adam Peller 12 years ago.
from Julian Cerruti (IBM, CCLA)

Download all attachments as: .zip

Change History (5)

Changed 12 years ago by Adam Peller

Attachment: gears.diff added

from Julian Cerruti (IBM, CCLA)

comment:1 Changed 12 years ago by Adam Peller

Summary: batch API for gears to improve performance[patch][ccla]batch API for gears to improve performance

comment:2 Changed 12 years ago by Adam Peller

Cc: jcerruti@… added

some rough measurements to show impact -- does not include overhead

===== test_FlashMultipleItems: Start filler.put: howmany = 1, this.howmany = 0 test_FlashMultipleItems: Adding 8432 bytes of data took 14ms filler.put: howmany = 1, this.howmany = 0 test_FlashMultipleItems: Adding 11 bytes of data took 10ms filler.put: howmany = 100, this.howmany = 0 test_FlashMultipleItems: Adding 100 items of 11 bytes of data took 568ms test_FlashMultipleItems: Adding 100 items of 11 bytes of data with putMultiple took 19ms test_FlashMultipleItems: Reading 100 items of 11 bytes of data took 72ms test_FlashMultipleItems: Reading 200 items of 11 bytes of data took 141ms test_FlashMultipleItems: Reading 200 items of 11 bytes of data with getMultiple took 138ms test_FlashMultipleItems: Deleting 200 items of 11 bytes of data with removeMultiple took 20ms test_FlashMultipleItems: Deleting 200 items of 11 bytes of data took 152ms test_FlashMultipleItems: End =====

comment:3 Changed 12 years ago by guest

Cleanup of last comment:

===== 
Adding 8432 bytes of data took 14ms 
Adding 11 bytes of data took 10ms 
Adding 100 items of 11 bytes of data took 568ms 
Adding 100 items of 11 bytes of data with putMultiple took 19ms
Reading 100 items of 11 bytes of data took 72ms
Reading 200 items of 11 bytes of data took 141ms
Reading 200 items of 11 bytes of data with getMultiple took 138ms
Deleting 200 items of 11 bytes of data with removeMultiple took 20ms
Deleting 200 items of 11 bytes of data took 152ms 
=====

Note put 100 items: 568ms -> 19ms and remove 200 items 152ms -> 20ms

comment:4 Changed 12 years ago by bradneuberg

Resolution: fixed
Status: newclosed

Julian, thanks for the patch. Applied to the Dojo tree August 15th, 2007. Ran the dojox/storage/tests/test_storage.html page after patch, which still works. However, I don't have any code which uses putMultiple/getMultiple, so didn't directly test those functions. Everything is in SVN now.

Note: See TracTickets for help on using tickets.