[annotator-dev] Problem with 1.2.x performance on long documents
Michael Widner
mikewidner at stanford.edu
Tue Nov 17 18:19:18 UTC 2015
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
>
More information about the annotator-dev
mailing list