Open jsbroks opened 5 years ago
Hi, I can't reproduce the issue, this seems pretty smooth to me (Windows 10/Chrome 72). What device/browser are you using ? Can you try to make the reproduction case more obvious by including the shape drawing in the code instead of asking us to draw it ?
Test the issue in Windows 10/Ubuntu 18.04 on both FireFox 65.0.1 and Chrome 72.0.3626.121 .
Here is one with an example path once you get to around 0.3 on the scale it starts to freeze up
Edit: Strokes causes the issue to occur earlier, but if you add enough shapes it will persist
@sasensi So I figured out what the problem is for my use case, which is probably related to the issue above.
I have many CompoundPath's inside a group and when zooming in it calls the draw function on each Item. This includes the Group class its self... and because the group object does not have the function _canCompose() defined, it defaults to false. This causes the process function to be called which has huge performance implications on large scales.
Is it safe to say we can set the _canComposite()
of a group to true?
@jsbroks, thanks for the clear reproduction example, it makes my browser crash too now.
Based on your investigation, I will try to see if there is something that we can improve to prevent that.
@sasensi Hi! curious if there are any updates (even if it's that this isn't a priority). I'm also seeing crashes when using coco annotator in a similar manner, trying to annotate polygons in images that are 8000x6000 using the magic and tool
@rbavery, sorry for the lack of feedback about this, I personally don't have time currently to work on the project so unfortunately I won't be able to take care of it soon. If you want to give a try to the investigation or provide other reduced reproduction cases, feel free.
@sasensi Thanks for the quick reply, I appreciate it and understand. Unfortunately I don't know enough currently about frontend to start debugging this. I think Justin's example above reproduces the issue but here is another image that can be tested if anyone is interested in solving this issue. I'm currently having issues with annotating complex shapes zoomed in on this image in COCO Annotator due to this Paperjs issue: https://figshare.com/ndownloader/files/31307755
Description/Steps to reproduce
Link to reproduction test-case
Sketch
Expected result
Smooth transitions well zooming in on complex shapes
What options do we have for rendering only objects in view? Does anyone have work arounds for this?