We found another major performance problem was in the '_setupDynamicStyle' method (1.2.10), or 'injectDynamicStyle' against the current head. The selector which loads up every non-annotator node in the entire document in order to find the largest z-index.
I just wrapped an if test around options and let the user send an arbitrary z-index in with the options. In our particular use case this is fine and shaved a few seconds off the page load times. Ta, Greg On 18 November 2015 at 05:19, Michael Widner <[email protected]> wrote: > Thanks to a similar issue in the 2.x branch that's already been fixed and > Randall's guidance, I was able back-port the fix to the 1.2.x branch: > > https://github.com/openannotation/annotator/pull/577 > > My testing shows that these changes made a massive difference in > performance. > > Best, > > Mike > > On 11/16/15 4:27 PM, Michael Widner wrote: > >> Hi all, >> >> I've discovered that when loading annotations on a long document (think: >> a novel), the performance degrades so severely that it becomes unusable for >> many people. For me, the test I'm looking at takes 16 full seconds to >> finish setting up annotations. The offending call happens at from >> Util.getTextNodes(). >> >> The problem, if I'm understanding it correctly, is that it's having to >> walk the entire, very large DOM searching for all the text nodes. Has >> anyone else tried running Annotator on a long text? If so, did you find any >> work-arounds for the performance problem? Without rewriting the involved >> routines, the only solution I can think of is to only load annotations on >> the visible screen, but that's also a significant change. >> >> I'd very much appreciate any ideas or help. >> >> Thanks, >> >> Mike >> >> > > _______________________________________________ > annotator-dev mailing list > [email protected] > https://lists.okfn.org/mailman/listinfo/annotator-dev > Unsubscribe: https://lists.okfn.org/mailman/options/annotator-dev >
_______________________________________________ annotator-dev mailing list [email protected] https://lists.okfn.org/mailman/listinfo/annotator-dev Unsubscribe: https://lists.okfn.org/mailman/options/annotator-dev
