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

refactor: refactor file filtering for improved efficiency #2128

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

mdqst
Copy link

@mdqst mdqst commented Mar 1, 2025

I’ve made improvements to the file filtering logic for better performance and readability. Specifically, I replaced the use of .to_string_lossy() with .to_str() where possible, as it’s more efficient when dealing with UTF-8 file names. Additionally, I’ve switched to using Path::extension() for checking .json files, which is a more idiomatic and performant approach.

p.s. This update should help streamline the code.

Copy link

codspeed-hq bot commented Mar 1, 2025

CodSpeed Performance Report

Merging #2128 will improve performances by 7.69%

Comparing mdqst:patch-1 (37ea977) with main (739ffd3)

Summary

⚡ 2 improvements
✅ 6 untouched benchmarks

Benchmarks breakdown

Benchmark BASE HEAD Change
analysis 228.3 µs 221.6 µs +3.03%
transfer 97.6 µs 90.6 µs +7.69%

Copy link
Member

@rakita rakita left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm. fmt pending

@mdqst
Copy link
Author

mdqst commented Mar 4, 2025

rakita pls merge it

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.

2 participants