forked from stephentu/silo
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Create twigs when creating new layers.
Consider inserting these two keys in sequence: www.fart/barf/hello/one/two/three www.fart/barf/hello/one/two/four We previously moved through the following states: www.fart #0: /barf/hello/one/two/three www.fart #0: [unused suffix] LAYER /barf/he #0: llo/one/two/three www.fart #0: [unused suffix] LAYER /barf/he #0: [unused suffix] LAYER llo/one/ #0: two/three www.fart #0: [unused suffix] LAYER /barf/he #0: [unused suffix] LAYER llo/one/ #0: [unused suffix] LAYER two/thre #0: e www.fart #0: [unused suffix] LAYER /barf/he #0: [unused suffix] LAYER llo/one/ #0: [unused suffix] LAYER two/thre #0: e two/four stephentu#1 That created, initialized, and then rendered unused two suffix structures for the intermediate layers. But there's no need to create such structures. We can tell while creating a layer whether we'll need to split it. Now we do this: www.fart #0: /barf/hello/one/two/three www.fart #0: [unused suffix] LAYER /barf/he #0: LAYER llo/one/ #0: LAYER two/thre #0: e two/four stephentu#1 The intermediate layers are created without suffixes. This allocates about 1/2 as much memory for key suffixes on the URL test.
- Loading branch information
Showing
2 changed files
with
43 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters