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

Cache resolved links #3801

Merged
merged 2 commits into from
Apr 20, 2023
Merged

Cache resolved links #3801

merged 2 commits into from
Apr 20, 2023

Conversation

aduffeck
Copy link
Contributor

decomposedfs now keeps an in-memory cache for node ids, sparing a lot of ReadLink calls. The cache is currently limited to 1M entries, this number can be made configurable in the future if needed.

stats from testing (warm cache):

List the space root with 24 files and 2 subdirs:
Before:                                             After
+-----------+------------------+-------+            +-----------+------------------+-------+
| Function  | last 5 second(s) | total |            | Function  | last 5 second(s) | total |
+-----------+------------------+-------+            +-----------+------------------+-------+
| Chtimes   |                0 |    10 |            | Chtimes   |                0 |    10 |
| Create    |                0 |     5 |            | Create    |                0 |     5 |
| Open      |                1 |    33 |            | Open      |                1 |    34 |
| OpenFile  |                0 |     0 |            | OpenFile  |                0 |     0 |
| Lstat     |               25 |   112 |            | Lstat     |               25 |   137 |
| MkdirAll  |                0 |    23 |            | MkdirAll  |                0 |    23 |
| ReadFile  |                0 |     5 |            | ReadFile  |                0 |     5 |
| Readlink  |               27 |   156 |            | Readlink  |                1 |   131 |
| Rename    |                0 |     0 |            | Rename    |                0 |     0 |
| Remove    |                0 |    20 |            | Remove    |                0 |    20 |
| RemoveAll |                0 |     0 |            | RemoveAll |                0 |     0 |
| Stat      |                0 |    77 |            | Stat      |                0 |    39 |
| Symlink   |                0 |    15 |            | Symlink   |                0 |    15 |
| WriteFile |                0 |     0 |            | WriteFile |                0 |     0 |
+-----------+------------------+-------+            +-----------+------------------+-------+

@aduffeck aduffeck force-pushed the cache-resolved-links branch 2 times, most recently from 37257a4 to 79ae97f Compare April 19, 2023 11:16
@butonic butonic merged commit 11edad1 into cs3org:edge Apr 20, 2023
@micbar micbar mentioned this pull request May 3, 2023
89 tasks
2403905 pushed a commit to 2403905/reva that referenced this pull request May 19, 2023
* Cache resolved node ids for paths

* Add changelog
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