Closed leitdeux closed 1 year ago
Doing some investigations and profiling it seems that the setup guard that was used to make sure the setup function was called so that the cache hash could be compiled was causi
Interesting. I did some investigations and found that the setup guard was causing cache misses every time. The setup guard is used so that if load is called without setup
being called it would call setup to have the cache loaded. Moving the setup guard to before the load
and setup
functions seems to solve the issue.
@leitdeux I created a PR #331 with a fix. Can you confirm that this solves your issue.
Yes that fixes it-- I'm seeing sub-millisecond loading times again when I call :StartupTime. Thanks very much!
Thanks for your hard work on this awesome theme.
When I measured start-up time of Neovim (via :StartupTime, https://github.com/tweekmonster/startuptime.vim), v3.3.0 of Nightfox was taking on average for me 0.5 ms on start-up, whereas v3.4.0 is now for me somewhere between 18~20ms. I can confirm that my themes were indeed compiled when I upgraded to v3.4.0, and also tried removing the plugin and cache and re-installing to see if that would help but I'm still seeing that same higher start-up time. Of course it's not a deal-breaker or anything, just something I noticed. I experience these longer start-up times in both Neovim v0.8.3 and v0.9.0 on macOS 13.0.
v.3.3.0 (upon running :StartupTime)![nightfox-3 3 0](https://user-images.githubusercontent.com/16680740/231015976-8bebeae4-66a7-4933-9ba7-e6854d687760.png)
v.3.4.0![nightfox-3 4 0](https://user-images.githubusercontent.com/16680740/231016113-54388c7e-8876-41d7-801a-04ec7495e0d1.png)