nmadhire / jwpl

Automatically exported from code.google.com/p/jwpl
0 stars 0 forks source link

[RevisionMachine] Enable lazy loading for the Revision Object #61

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
When a Revision object is created, it automatically reconstructs the revision 
text. This needs a lot of time 20 - 200ms.
If only meta data is needed but not the revision text, the reconstructions is 
not necessary. 

Solution: Perform lazy loading - only reconstruct the text if the getText 
method is called. (then store it in the object for further reuse)

This has to be documented as the main effort will then be in the getText method 
and not in the constructor.

Original issue reported on code.google.com by oliver.ferschke on 7 Nov 2011 at 3:37

GoogleCodeExporter commented 9 years ago

Original comment by oliver.ferschke on 7 Nov 2011 at 3:37

GoogleCodeExporter commented 9 years ago
Implemented in r478

Lazy loading is now the default when Revision objects are created via the 
RevisionAPI.

Lazy loading is turned off by default in the RevisionIterator. It can be 
manually turned on in the RevisionIterator constructor.

Original comment by oliver.ferschke on 23 Nov 2011 at 11:45

GoogleCodeExporter commented 9 years ago

Original comment by oliver.ferschke on 16 Feb 2012 at 1:19