• Robert Knight's avatar
    Remove unnecessary `requestAnimationFrame` callbacks in `Guest` · 2a4045de
    Robert Knight authored
    Profiling anchoring of large numbers of annotations in Chrome showed
    that there was significant overhead for scheduling and
    executing `requestAnimationFrame` callbacks. In the case of `Guest.anchor`, the
    callback often did nothing (it called `removeHighlights` with an empty
    array).
    
    There isn't a need for this any more AFAICS so just invoke the logic
    synchronously, which is much cheaper.
    2a4045de
guest.js 21.2 KB