xtk / X

The X Toolkit
http://www.goXTK.com
Other
793 stars 265 forks source link

Slices scrolling performance in 2d canvas #150

Closed younes200 closed 4 years ago

younes200 commented 10 years ago

Hi all, I Noticed slow 2d rendering performance when scrolling in slices, here is my example : http://my.slicedrop.com/?r9

I know that WebGL can be much faster than canvas 2D but can we improve the 2d render when scrolling by caching the buffered images ?

Thank you.

NicolasRannou commented 10 years ago

Hi Younes,

The links to your demo seems broken... Scrolling should be slow only the first time then once all the slices are cached it should be fast:

Here is how it works in XTK right now:

At load time: We cache only center slices in all directions. (i.e. only 3 slices so it loads much faster)

On scroll: If the requested slice doesn't exist, create it and cache it. If the requested slice is cached, render it.

Thanks

On Thu, Apr 17, 2014 at 7:17 AM, Younes notifications@github.com wrote:

Hi all, I Noticed slow 2d rendering performance when scrolling in slices, here is my example : http://my.slicedrop.com/?r9http://my.slicedrop.com/?r9&utm_campaign=website&utm_source=sendgrid.com&utm_medium=email

I know that WebGL can be much faster than canvas 2D but can we improve the 2d render when scrolling by caching the buffered images ?

Thank you.

— Reply to this email directly or view it on GitHubhttps://github.com/xtk/X/issues/150?utm_campaign=website&utm_source=sendgrid.com&utm_medium=email .