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
Cache obtaining patched index for twemoji #19
Conversation
Otherwise this heavy operation (including a large glob and more) runs on every call to 'twemoji'
Curious, does MkDocs instantiate multiple Markdown objects or does it create one and reset it each time? If it is the first, is there a reason for that? Normally, the index is should only get built once per Markdown object. I suspect MkDocs is instantiating multiple Markdown objects though. As far as caching here, I guess there is no problem with it, but but I would think it shouldn't be necessary, but I don't know why or how MkDocs implements everything internally. |
Yes, MkDocs instantiates one Markdown object per page. |
-that code being not in MkDocs itself; if it was just about MkDocs, I could change it quite easily |
Okay, then that explains it. I never verified, but I assumed (wrongly) that the Markdown object was loaded once per site and reset between pages. Obviously, that is not the case. We'll push forward with this though. It will help alleviate build times on large projects. |
Hmm, looks like we have some failures. I'll have to make sure the tip is still passing before I can make any assumptions. Assuming the tip is passing with recent versions of everything, we'll have to address the failures before we can merge. |
For sure- I'll look into it in a day |
I fixed tests on the tip. Material exposes Material, Octicons, and FontAwesome icons, but sometimes, the naming convention for some of the icons change. This will break the tests. You should be able to rebase and pick up working tests. |
I made a merge via GitHub UI 🙂 |
@gir-bot lgtm |
Otherwise this heavy operation (including a large glob and more) runs on every call to 'twemoji'
For
mkdocs build
of mkdocs-material-insiders, this brings the total build time from 6.7s to 4.3s