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

low compilation performance when embeding large folder even though having excludes. #233

Open
gy0801151351 opened this issue Feb 8, 2024 · 1 comment

Comments

@gy0801151351
Copy link

gy0801151351 commented Feb 8, 2024

During my test, I found the macro RustEmbed always scans the files under the excluded folders.

#[derive(RustEmbed)]
#[folder = "resources"]
#[exclude = "node_modules/*"]
struct Assets;


fn main() {
    for item in <Assets as RustEmbed>::iter() {
        println!("{item}");
    }
}

The attachment is my test project. Please verify. I wish macro RustEmbed would skip scanning the excludes folders and files under them.

hello-rust-embed.zip

@gy0801151351 gy0801151351 changed the title Very slow compilation performance when embeding large folder even though having excludes. low compilation performance when embeding large folder even though having excludes. Feb 8, 2024
@pyrossh
Copy link
Owner

pyrossh commented Feb 9, 2024

@gy0801151351 It seems your'e right.. Would you be interested in a PR?

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