Changes between Version 4 and Version 5 of Ticket #12428


Ignore:
Timestamp:
Mar 11, 2011, 6:40:29 AM (9 years ago)
Author:
liucougar
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #12428 – Description

    v4 v5  
    1 the generate.php script currently has two O2 complexity loops, by introducing a hash, they can be changed to O complexity
     1the generate.php script currently has two O(n^2^) complexity loops, by introducing a hash, they can be changed to O(n) complexity
    22
    33in addition, the default file store is very inefficient: when it writes new information to a file, it creates a new tmp file for each new row of information, copying over all contents in the current file, then write new content, rename the tmp file to the current file
    44
    5 by again using hash, instead of writing to files, the performance can be dramatically improved (this only involves one read, one write file IO, instead of file IO proportional to how many symbols there are in the parsed code)
     5by again using hash, instead of writing to files, the performance can be dramatically improved (this only involves O(n) file IO, instead of O(n^2^) file IO proportional to how many symbols there are in the parsed code)
    66
    77before the change, the:
     
    2626}}}
    2727
    28 so the performance improvement is about 3x faster when parsing dojo and dijit with the patch than the current version. (the performance improvement is much greater if parsing dojo, dijit and dojox, because the current algorithm has two loops with O2 complexity, and file IO proportional to symbols in the parsed content)
     28so the performance improvement is about 3x faster when parsing dojo and dijit with the patch than the current version. (the performance improvement is much greater if parsing dojo, dijit and dojox, because the current algorithm has two loops with O(n^2^) complexity, and file IO proportional to symbols in the parsed content)
    2929
    3030it does require 3x memory than current approach