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

Severe performance regression in pathfinding::directed::dijkstra #639

Open
ptesarik opened this issue Jan 15, 2025 · 4 comments
Open

Severe performance regression in pathfinding::directed::dijkstra #639

ptesarik opened this issue Jan 15, 2025 · 4 comments

Comments

@ptesarik
Copy link

An attempt to upgrade pathfinding to version 4 results in a severe performance regression in Dijkstra's algorithm for rapidquilt.

I have reference setup (based on an actual real-world case), where pathfinding 3.0.14 finishes in reasonable time:

real    0m21,407s
user    0m21,330s
sys     0m0,094s

But pathfinding 4.13.0 takes ages:

real    7m10,000s
user    7m9,897s
sys     0m0,094s

Reverting commit 808b951 restores good performance.

@ptesarik
Copy link
Author

To reproduce the issue, unpack issue639.tar.gz and run rapidquilt push in the unpacked directory.

@samueltardieu
Copy link
Collaborator

Thanks for the report, the analysis, and the reproduction package. Since it does not change any functionality, I'll revert the commit and issue a new release (I'll post it there) until I can investigate it further.

@ptesarik
Copy link
Author

FWIW I have also extracted a self-contained reproducer:
https://gist.github.com/ptesarik/42e8e42f3034e93a61f7289fb92aaeb4

samueltardieu added a commit that referenced this issue Jan 15, 2025
This backs out comit 808b951
"Remove optimization which gives worst benchmark results", as it
severely degrades performances as shown in
<#639>.
github-merge-queue bot pushed a commit that referenced this issue Jan 15, 2025
This backs out comit 808b951
"Remove optimization which gives worst benchmark results", as it
severely degrades performances as shown in
<#639>.
@ptesarik ptesarik changed the title Severe peformance regression in pathfinding::directed::dijkstra Severe performance regression in pathfinding::directed::dijkstra Jan 15, 2025
@samueltardieu
Copy link
Collaborator

pathfinding 4.13.1 has just been released and backs this patch out. I'll investigate further, I'll keep this issue open.

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

No branches or pull requests

2 participants