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

is_dir/is_file small improvements #1241

Merged
merged 1 commit into from Apr 7, 2024

Conversation

qarmin
Copy link
Contributor

@qarmin qarmin commented Apr 7, 2024

  • reads file entry type instead using is_file/is_dir
  • file type is checked now at the top of function to avoid unnecessary computations like path = entry.path()

changes are visible in flamegraph(probably no big gains, but at least helped a little in my project)

Screenshot from 2024-04-07 14-19-11

Screenshot from 2024-04-07 14-52-53

@GuillaumeGomez
Copy link
Owner

Thanks!

@GuillaumeGomez GuillaumeGomez merged commit 87c627c into GuillaumeGomez:master Apr 7, 2024
63 of 67 checks passed
GuillaumeGomez added a commit that referenced this pull request Apr 8, 2024
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

Successfully merging this pull request may close these issues.

None yet

2 participants