Opened 13 years ago

Closed 13 years ago

#8597 closed defect (wontfix)

performance: dojo.js could be faster

Reported by: Douglas Hays Owned by: anonymous
Priority: high Milestone: tbd
Component: Core Version: 1.2.3
Keywords: Cc:
Blocked By: Blocking:


I noticed 2 performance issues wrt the getRootNode method in dojo.js:
1) it starts looking for its script at 0 but its always found at the last script since the scripts are being run as they are encountered, so starting with the last and working backwards would be faster.
2) getRootNode() is called twice, firstly to get the root path and secondly to get the script node reference - it should cache the value since the function does a lot of DOM ops

Change History (1)

comment:1 Changed 13 years ago by James Burke

Resolution: wontfix
Status: newclosed

This is for the src version of dojo.js -- in general this file is just used for testing raw source and is not designed to be extremely efficient. The getRootNode() may or may not be called twice depending on if djConfig.baseUrl is defined. I do not feel a great urgency to fix this, so closing it as wontfix.

If you have noticed a measurable decrease in performance, it would be good to know, but otherwise closing as wontfix.

Note: See TracTickets for help on using tickets.