Opened 6 years ago

Closed 6 years ago

Last modified 6 years ago

#17282 closed defect (wontfix)

The performace of function "newItem" of "dojo/data/ItemFileWriteStore.js" downgrades since dojo 1.1

Reported by: wangfcdl Owned by: wangfcdl
Priority: undecided Milestone: tbd
Component: Data Version: 1.5
Keywords: Cc:
Blocked By: Blocking:

Description

Some of our product codes called function "newItem" of "dojo.data.ItemFileWriteStore?" to create a tree view. There are 3 versions of our product, the part of codes are the same for the 3 versions, but the older version uses dojo 1.3, the middle version uses dojo 1.5, and the latest version uses dojo 1.8. Recently we testing the 3 versions with the same huge amount of tree node data and found serious performance downgrade with the middle version and the latest version, especially on IE 8 and above. By debugging and comparing the reports with IE developer tools "Profiler" of the older version and middle version, we found it seems is caused by the following codes in function "newItem" of "dojo.data.ItemFileWriteStore?". The codes are introduced since dojo 1.5 (maybe 1.4, we have not test that version). Comparing with dojo 1.3, seems there are extra time consuming on calling "isItem".

newItem: function(/* Object? */ keywordArgs, /* Object? */ parentInfo){ ......

if(this.referenceIntegrity){

for(var i = 0; i < value.length; i++){

var val = value[i]; if(this.isItem(val)){

this._addReferenceToMap(val, newItem, key);

}

}

}

...... }

I will attach the codes of function "newItem" of "dojo.data.ItemFileWriteStore?" for dojo 1.3 and 1.5, also the reports with IE developer tools "Profiler" from the older version and middle version of our product.

Attachments (4)

dojo_1.3_ItemFileWriteStore_newItem.js (4.2 KB) - added by wangfcdl 6 years ago.
dojo_1.5_ItemFileWriteStore_newItem.js (4.5 KB) - added by wangfcdl 6 years ago.
IE_profiler_tree_dojo_1.3.jpg (117.8 KB) - added by wangfcdl 6 years ago.
IE_profiler_tree_dojo_1.5.jpg (211.6 KB) - added by wangfcdl 6 years ago.

Download all attachments as: .zip

Change History (7)

Changed 6 years ago by wangfcdl

Changed 6 years ago by wangfcdl

Changed 6 years ago by wangfcdl

Changed 6 years ago by wangfcdl

comment:1 Changed 6 years ago by bill

Owner: set to wangfcdl
Status: newpending

Sounds like you are talking about the changes from #4552, but that's from 1.1. 1.3 already has the code you are talking about (the code you said that changed between 1.3 and 1.5), see https://github.com/dojo/dojo/blob/1.3.0/data/ItemFileWriteStore.js#L173.

Did you get your version numbers wrong?

comment:2 Changed 6 years ago by wangfcdl

Status: pendingnew

Yes,I made a mistake on the version. The version should be 1.0 instead of 1.3. Sorry about it. You are right that I'm talking about line 173 to 180 in "ItemFileWriteStore?" in the changes from #4552 (https://bugs.dojotoolkit.org/changeset/11972/legacy).Now I know that the part of codes is for fixing a defect when removing references. But the solution has impact on performance when there are huge data. Is there a way that I can work around the performance issue? I also found a similar report on the performance issue in https://bugs.dojotoolkit.org/ticket/16500, but it is closed due to no response from the submitter. Thanks for your quick response.

comment:3 Changed 6 years ago by bill

Resolution: wontfix
Status: newclosed
Summary: The performace of function "newItem" of "dojo/data/ItemFileWriteStore.js" downgrades since dojo 1.5The performace of function "newItem" of "dojo/data/ItemFileWriteStore.js" downgrades since dojo 1.1

OK, good.

The workaround is simply to set yourStore.referenceIntegrity = false. That should bring the performance back to 1.0 levels and solve your problem.

Marking as "wontfix" because:

  1. there's a workaround
  2. dojo/data is deprecated in favor of dojo/store
  3. (as you mentioned) this integrity checking code is there for a reason
Last edited 6 years ago by bill (previous) (diff)
Note: See TracTickets for help on using tickets.