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

Shake spends predominant time reading its database #108

Closed
srid opened this issue Feb 28, 2020 · 1 comment · Fixed by #109
Closed

Shake spends predominant time reading its database #108

srid opened this issue Feb 28, 2020 · 1 comment · Fixed by #109

Comments

@srid
Copy link
Owner

srid commented Feb 28, 2020

With shakeTimings = True:

Function shake                    0.000s    0%
Database read                     0.894s   73%  =========================
With database                     0.072s    5%  ==
Running rules                     0.246s   20%  ======
Pool finished (1 threads, 1 max)  0.000s    0%
Cleanup                           0.000s    0%
Total                             1.212s  100%

Size of the database for this report:

$ du -sh .shake/
28M     .shake/
$
@srid
Copy link
Owner Author

srid commented Feb 28, 2020

Shake's cacheActionWith (added here) invokes cacheAction twice; once for the "key", and another for the "argument". In rib, the "key" is set to filename, and the "argument" is set to a tuple of filename and its contents. So effectively I think Shake is storing the file contents as a key in its cache. Since file contents are bound to change over time in a static site, we are seeing the Shake database grow in size over time as well.

So what is the solution here? 🤔

@srid srid added this to the 0.7 milestone Feb 28, 2020
@srid srid closed this as completed in #109 Feb 28, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant