Talk:XPath: Difference between revisions

From MozillaZine Knowledge Base
Jump to navigationJump to search
No edit summary
 
(re grimholtz)
Line 1: Line 1:
asquella, why did you write 'Note that you shouldn't use this function if you expect to get a long list of results from it.'
asquella, why did you write 'Note that you shouldn't use this function if you expect to get a long list of results from it.'
--[[User:grimholtz|grimholtz]]
--[[User:grimholtz|grimholtz]]
: That function copies query results to an array, taking additional memory and CPU cycles. I wouldn't use it at all, but for simple queries I think that simpler interface is worth the overhead. (Not that I've done any profiling.)
: Related example (though not completely applicable): try opening JS Console when it has a lot of entries [[User:Asqueella|asqueella]]

Revision as of 19:13, 10 March 2005

asquella, why did you write 'Note that you shouldn't use this function if you expect to get a long list of results from it.' --grimholtz

That function copies query results to an array, taking additional memory and CPU cycles. I wouldn't use it at all, but for simple queries I think that simpler interface is worth the overhead. (Not that I've done any profiling.)
Related example (though not completely applicable): try opening JS Console when it has a lot of entries asqueella