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

[wip] drop file handles off-thread #222

Closed
wants to merge 1 commit into from
Closed

Conversation

cmyr
Copy link
Member

@cmyr cmyr commented Dec 24, 2021

@madig here is a sketch of having a separate "file handle dropping" thread. Let me know if this shows a measurable speedup on windows? If it does I'll clean it up and figure out a way to make this windows-only.

see #109

@github-actions
Copy link

🗜 Bloat check ⚖️

Comparing 8a7c63c against 0e84611

target old size new size difference
target/release/examples/load_save 1.9 MB 1.95 MB 50.77 KB (2.61%)
target/debug/examples/load_save 8.56 MB 9.01 MB 463.26 KB (5.29%)

@cmyr cmyr marked this pull request as draft December 24, 2021 20:15
@madig
Copy link
Collaborator

madig commented Dec 25, 2021

Cool :D might take me a while to test this on Windows. I wonder if there's a handle limit on Windows we have to obey...

@madig
Copy link
Collaborator

madig commented Jan 10, 2022

This seems to do nothing on my Windows machine.

Before, loading and saving https://github.com/madig/noto-amalgamated/tree/main/NotoAmalgamated-Regular.ufo with load_save.rs:

loaded 60967 glyphs from an unnamed font in 7.772s.
wrote UFO to disk in 43.483s
loaded 60967 glyphs from an unnamed font in 7.600s.
wrote UFO to disk in 44.758s
loaded 60967 glyphs from an unnamed font in 7.544s.
wrote UFO to disk in 43.289s

This branch:

loaded 60967 glyphs from an unnamed font in 8.231s.
wrote UFO to disk in 44.176s
loaded 60967 glyphs from an unnamed font in 7.494s.
wrote UFO to disk in 44.153s
loaded 60967 glyphs from an unnamed font in 7.486s.
wrote UFO to disk in 44.119s

@cmyr
Copy link
Member Author

cmyr commented Jan 10, 2022

hm, that's disappointing, maybe this code isn't doing what I think it is? Unfortunately I don't have a PC here to play with...

@madig
Copy link
Collaborator

madig commented Jan 10, 2022

I think I have to, at some point, get into profiling with Windows tools to figure out where all the time goes...

@cmyr cmyr closed this Jan 11, 2022
@madig
Copy link
Collaborator

madig commented Mar 11, 2022

Let's maybe keep this around and open until I find the time to look into 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