-
-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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 path by id #43471
Merged
Merged
Cache path by id #43471
Conversation
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
icewind1991
force-pushed
the
cache-path-by-id
branch
from
February 9, 2024 09:15
2e8fb89
to
e7108d5
Compare
icewind1991
force-pushed
the
cache-path-by-id
branch
2 times, most recently
from
February 9, 2024 10:58
ed9cc7d
to
a2846be
Compare
icewind1991
force-pushed
the
cache-path-by-id
branch
3 times, most recently
from
February 16, 2024 11:23
6baf20a
to
57e7266
Compare
icewind1991
force-pushed
the
cache-path-by-id
branch
2 times, most recently
from
February 16, 2024 12:03
0a36121
to
68ad797
Compare
icewind1991
requested review from
a team,
ArtificialOwl,
blizzz and
nfebe
and removed request for
a team
February 16, 2024 12:57
icewind1991
force-pushed
the
cache-path-by-id
branch
from
February 16, 2024 13:43
2f8b275
to
82b8696
Compare
come-nc
reviewed
Feb 19, 2024
skjnldsv
added
2. developing
Work in progress
and removed
3. to review
Waiting for reviews
labels
Feb 23, 2024
icewind1991
force-pushed
the
cache-path-by-id
branch
from
February 27, 2024 13:50
82b8696
to
3ed8287
Compare
come-nc
approved these changes
Feb 27, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
icewind1991
force-pushed
the
cache-path-by-id
branch
2 times, most recently
from
February 29, 2024 15:52
dbb9170
to
3dfef53
Compare
…des for the id this should be enough in most(?) cases and makes efficient implementation and caching easier Signed-off-by: Robin Appelman <robin@icewind.nl>
icewind1991
force-pushed
the
cache-path-by-id
branch
from
March 4, 2024 11:33
3dfef53
to
5d55e1a
Compare
…rstNodeById Signed-off-by: Robin Appelman <robin@icewind.nl>
Signed-off-by: Robin Appelman <robin@icewind.nl>
icewind1991
force-pushed
the
cache-path-by-id
branch
from
March 4, 2024 12:57
5d55e1a
to
a9ee278
Compare
icewind1991
added
3. to review
Waiting for reviews
performance 🚀
and removed
2. developing
Work in progress
labels
Mar 5, 2024
Altahrim
approved these changes
Mar 5, 2024
Merged
9 tasks
8 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Cache fileid to path mapping.
The fact that a single fileid can have multiple paths complicates attampts to cache this information, however since most usages of
getById
only use a single item of the result, and always the same one (whether or not this is correct for that usage is another question 🙈). We can provide a new api that only returns a single result which makes caching easier.We can get away with using a local cache without doing any active cache invalidation by checking that the node at the path we cached still has the correct fileid.
getFirstNodeById
to get a single node for id regardless of how many nodes with that id the user hasgetById
that always use the first node to the new apigetFirstNodeById
I would recommend reviewing this PR commit-by-commit as most of the changes by LOC are mechanical changes to adjust to the new api.