librecad slows down

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

librecad slows down

zohir
hi
after installing librecad Version: Version: 2.2.2 alpha 1-193-g31aec8b1,on in windows10 machine,i noticed excellent performance and acceptable fluidity for large dxf and dwg files,but i noticed that by activating the snapping option, the performance of librecad slows down and the snapping option does not work.
This behavior is only observed when i working in a large file.

best regard
Reply | Threaded
Open this post in threaded view
|

Re: librecad slows down

sand1024
hm.. that's really strange. Performance is improved indeed, yet as for the snap - in general, it should be similar to previous versions.

A couple of questions for snap' performance degradation:
1) what are you current grid settings (i.e. - is it enabled, which type of grid is used)?
2) which snap modes are enabled (i.e. snap to grid, snap to entity etc.)?
3) could you share the dxf with such performance drop somehow?
Reply | Threaded
Open this post in threaded view
|

Re: librecad slows down

zohir
)The file used is: cerles_large.dxf, in the link:   https://github.com/user-attachments/files/17384632/LC_Tests_1.zip 
 2) all snaps option are activated include the grid after installation
Reply | Threaded
Open this post in threaded view
|

Re: librecad slows down

sand1024
In reply to this post by zohir
hm... well, that's file from test set is quite a heavyweight considering amount of entities...
And on "zoom to fit" zoom level - indeed, potentially snap may slowdown (simply because there are too many entities around snap positions).

So another question there - do you experience performance drop on each zoom levels or on some specific ones?  Say, grid status value may be helpful.

Also, could you please also try to disable all snap modes, and find the minimal combination of enabled snaps that leads to performance slowdown?

For example, "snap to grid" itself works just find, "snap to entity" - suppose it is slower etc.

Also, could you please create a ticket on GitHub with details? (https://github.com/LibreCAD/LibreCAD/issues)
Thank you.
Reply | Threaded
Open this post in threaded view
|

Re: librecad slows down

dxli
@sand1024

At the algorithm level, we still have some expensive complexities:

For example, intersection finding, we are doing it O(N^2), trying to find intersections pairwise.

For block(text), we need to review updates sequences. I won't be surprised if there are quadratic or even exponential algorithms. For example, we may call a parent updating and trigger recursively updating all direct children.

For intersections, using r-tree might avoid the quadratic in some cases: like lots of small bounding boxes.

For blocks and texts, we just need to rewrite some algorithms to provide DFS type of updating sequence to guarantee linear complexity.
sand1024 wrote
hm... well, that's file from test set is quite a heavyweight considering amount of entities...
And on "zoom to fit" zoom level - indeed, potentially snap may slowdown (simply because there are too many entities around snap positions).

So another question there - do you experience performance drop on each zoom levels or on some specific ones?  Say, grid status value may be helpful.

Also, could you please also try to disable all snap modes, and find the minimal combination of enabled snaps that leads to performance slowdown?

For example, "snap to grid" itself works just find, "snap to entity" - suppose it is slower etc.

Also, could you please create a ticket on GitHub with details? (https://github.com/LibreCAD/LibreCAD/issues)
Thank you.