Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Could parallelization be added? #6

Open
Vadoola opened this issue Aug 29, 2024 · 1 comment
Open

Could parallelization be added? #6

Vadoola opened this issue Aug 29, 2024 · 1 comment
Assignees
Labels
enhancement New feature or request

Comments

@Vadoola
Copy link
Owner

Vadoola commented Aug 29, 2024

If I add the ability to pass in multiple DXF files for converting, I could easily parallelize that. is there a way to parallelize if it's only operating on one file? such as iterating over the DXF elements in parallel?

@Vadoola Vadoola self-assigned this Sep 5, 2024
@Vadoola Vadoola added the enhancement New feature or request label Sep 5, 2024
@Vadoola
Copy link
Owner Author

Vadoola commented Oct 8, 2024

So I did a quick test, importing rayon, and adding a .par_bridge into the iterating over the drawing entities. Since the iteration happens over non-mutable references there are no real issues with sending it across thread boundaries. It my quick rough tests I found on more complex drawings I was getting about a 5-7% improvement in performance, although in very simple ones I saw a decrease by maybe 2%. This would make sense because on the simple drawings the overhead of setting up the threads is more than the benefit gained.

The question is the extra possible complexity (and I would assume bigger executable size from pulling in rayon, but I didn't check) worth the small performance benefit? Of course there may be other way to utilize parallelization and improve the performance more, this was just a super quick test to check my assumptions, and see if there were any pain points that I hadn't considered.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant