Hi, David- | At 08:24 AM 10/17/2005, Doug wrote: | >That way, you're only hitting the DOM to find the element | once, instead | >of twice. gEBI is a rather expensive method call, I would think, | >especially on large documents (unless the implementation | caches a hash | >table of all the ids). | | Interesting -- I would take this to mean that if I'm creating | a whole bunch of stuff dynamically -- where those things | might, later on, change, then it might be best to maintain, | in parallel, a JavaScript array of all the things (and their | attributes).
That's not what I meant (by "implementation," I meant the UA, the viewer, which might have some optimization of gEBI like that), but it is sometimes a sound approach (depending on your use case). I have often created a collection of objects, including the properties, metadata, and a reference to the representative element, and used that rather than the DOM to access properties, only updating the DOM when a rerendering is needed. I found that it often (but not always) worked faster and was easier than dealing with the DOM alone. Regards- Doug [EMAIL PROTECTED] www.vectoreal.com ...for scalable solutions. ------------------------ Yahoo! Groups Sponsor --------------------~--> Get Bzzzy! (real tools to help you find a job). Welcome to the Sweet Life. http://us.click.yahoo.com/A77XvD/vlQLAA/TtwFAA/1U_rlB/TM --------------------------------------------------------------------~-> ----- To unsubscribe send a message to: [EMAIL PROTECTED] -or- visit http://groups.yahoo.com/group/svg-developers and click "edit my membership" ---- Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/svg-developers/ <*> To unsubscribe from this group, send an email to: [EMAIL PROTECTED] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/

