[Webkit-unassigned] [Bug 200456] [results.webkit.org Timeline] Performance improvement - Skip render offscreen canvas

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Aug 8 17:26:24 PDT 2019


https://bugs.webkit.org/show_bug.cgi?id=200456

--- Comment #3 from Jonathan Bedard <jbedard at apple.com> ---
Comment on attachment 375860
  --> https://bugs.webkit.org/attachment.cgi?id=375860
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=375860&action=review

> Tools/resultsdbpy/resultsdbpy/view/static/library/js/components/TimelineComponents.js:121
> +class ColorBatchRender {

While you are generally rendering things by color, I don't see this class actually setting colors. It's more accurately a generic render batch map that you happen to be using colors as a key. I also don't get why you need to pass colors in.

With that in mind, I think that you need to pick. Either this class batches together renders by color (and so should set colors, but does not need to pass them to the callbacks) or, this is a generic batch mapping which maps any object to a set of associated render callbacks. In that case, it would seem that the very first function provided would define what sort of context you were defining (ie, is this about filling with a specific color, drawing lines with a specific color, using a specific font, etc)

> Tools/resultsdbpy/resultsdbpy/view/static/library/js/components/TimelineComponents.js:208
>                  context.fillStyle = color;

I'm surprised to see you setting the fillStyle in this function, I would have expected it to be set in the ColorBatchRender class

> Tools/resultsdbpy/resultsdbpy/view/static/library/js/components/TimelineComponents.js:375
> +                // Clean the canvas, free its memory

Do we really need to do this? It feels like a WebKit bug if we do.

> Tools/resultsdbpy/resultsdbpy/view/static/library/js/components/TimelineComponents.js:639
> +            context.strokeStyle = usedLineColor;

Shouldn't this be color instead of usedLineColor?

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20190809/d4d74fe6/attachment-0001.html>


More information about the webkit-unassigned mailing list