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

Fix performance bottleneck in cmp_canonical_path_prefix #87

Open
ilumsden opened this issue Feb 2, 2024 · 3 comments
Open

Fix performance bottleneck in cmp_canonical_path_prefix #87

ilumsden opened this issue Feb 2, 2024 · 3 comments

Comments

@ilumsden
Copy link
Collaborator

ilumsden commented Feb 2, 2024

While evaluating DYAD with the workflow benchmark, we found that cmp_canonical_path_prefix had a surprisingly large cost in terms of time. Some fixes, as suggested by @hariharan-devarajan, are:

  1. Remove the use of realpath
  2. Switch to a prefix tree-based algorithm for path comparison
@JaeseungYeom
Copy link
Contributor

You can cache the result of the first realpath() call as it translates the dyad managed path to real path.
The second one is there for correctness. You cannot omit that.

@hariharan-devarajan
Copy link
Collaborator

We also have to switch strcmp to prefix tree for faster comparison.

@JaeseungYeom
Copy link
Contributor

PR #89

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

3 participants