Skip to content

Try out making a better page cache - #127

Merged
diondokter merged 12 commits into
masterfrom
optimize-page-cache
Jul 8, 2026
Merged

diondokter merged 12 commits into
masterfrom
optimize-page-cache

Conversation

@diondokter

Copy link
Copy Markdown
Member

Queue fuzzer is not happy yet

@tweedegolf tweedegolf deleted a comment from github-actions Bot Jul 3, 2026
@tweedegolf tweedegolf deleted a comment from github-actions Bot Jul 3, 2026
@tweedegolf tweedegolf deleted a comment from github-actions Bot Jul 3, 2026
@github-actions

This comment was marked as outdated.

Comment thread src/cache/page_states.rs Outdated
Comment thread src/cache/page_states.rs Outdated
Comment thread src/cache/page_states.rs Outdated
…as the cache on current main, but it's only 18 bytes (so 20 with padding?)
@github-actions

This comment was marked as outdated.

@diondokter

Copy link
Copy Markdown
Member Author

Thanks for the review @Wassasin! In the end I went with a different approach, one that I can actually understand instead of something that works incidentally. That approach is now also documented a little bit. It doesn't have perfect knowledge, but the performance is still very good (see the changed perf stats in the tests).

What I don't like is that all the calculations are now taking up .text space...
So maybe I should also keep around the old impl and have people choose. The old impl is smaller and faster and will consume less ram when you only have ~8-16 pages or so.

@github-actions

This comment was marked as outdated.

@github-actions

github-actions Bot commented Jul 7, 2026

Copy link
Copy Markdown

PR build size

  text	   data	    bss	    dec	    hex	filename
 18704	     56	   1728	  20488	   5008	example

Diff

    FILE SIZE        VM SIZE    
 --------------  -------------- 
  +8.8% +48.6Ki  [ = ]       0    .debug_str
   +17% +3.81Ki  [ = ]       0    .strtab
  +0.2% +1.30Ki  [ = ]       0    .debug_info
  +0.3%    +365  [ = ]       0    .debug_line
  +1.2%    +224  +1.2%    +224    .text
  +2.3%    +192  [ = ]       0    .symtab
  +0.3%    +168  [ = ]       0    .debug_ranges
  +0.3%    +120  [ = ]       0    .debug_frame
  +0.6%    +104  [ = ]       0    .debug_aranges
   +19%      +7  [ = ]       0    [Unmapped]
  -0.1%      -5  [ = ]       0    .debug_abbrev
  -0.0%     -61  [ = ]       0    .debug_loc
  +3.3% +54.8Ki  +1.1%    +224    TOTAL

@diondokter

Copy link
Copy Markdown
Member Author

Todo: Update readme

@diondokter
diondokter marked this pull request as ready for review July 7, 2026 15:05
@diondokter
diondokter merged commit b24e7b1 into master Jul 8, 2026
5 checks passed
@diondokter
diondokter deleted the optimize-page-cache branch July 8, 2026 08:10
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