Closed Bug 919435 Opened 11 years ago Closed 11 years ago

Cache getEntity calls in mozmill tests lib/utils.js, to don't parse the DOM each time we need and dtd value

Categories

(Mozilla QA Graveyard :: Mozmill Tests, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED INVALID

People

(Reporter: cosmin-malutan, Unassigned)

Details

(Whiteboard: [enhancement])

As Andrei said in bug 865640 , we might want to cache utils.getEntity calls to don't parse a DOM each time we need an dtd value. http://hg.mozilla.org/qa/mozmill-tests/file/default/lib/utils.js#l303
This should not be a general method in utils.js but specific to the ui class, which makes use of those translations. We might want to have a base ui class which implements that while all the others are sub-classed from it. But that would have to be discussed first.
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → INVALID
> This should not be a general method in utils.js but specific to the ui class, > which makes use of those translations. We might want to have a base ui class > which implements that while all the others are sub-classed from it. We were thinking os using memoization in utils to cache previously loaded results. Not sure yet how much time this would save us, but since DOM parsing is expensive, it may add to quite a bit. With memoization we can just enhance utils.getEntity and get "free" speed enhancements without changing any code in each UI class or test. > But that would have to be discussed first. Isn't a bug a proper place for discussion? And only close the bug as INVALID if we find that this feature is not helpful/wanted/feasible? Should we first open a thread on mozmill-automation to get some feedback?
Bugzilla never has been a place for fundamental discussions and will not become such one. You really want to reach out to discussion groups aka forums, mailing lists, and newsgroups. Also what I forgot to mention in my last comment, once we switched to Mozmill 2.0 we will no longer use those methods in the utils.js module. Those can be killed given that mozmill itself has an l10n module exactly for that purpose.
Product: Mozilla QA → Mozilla QA Graveyard
You need to log in before you can comment on or make changes to this bug.