mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-10 13:00:29 +03:00
Kernel/SysFS: Prepend to the custody cache instead of append
Usage patterns mean we are more likely to need a Custody we just cached. Because lookup walks the list from the beginning, prepending new items instead of appending means they will be found quicker. This reduces the number of items in the cache we need to walk by 50% for boot and application startups.
This commit is contained in:
parent
86069fa28d
commit
f62ac5d81d
Notes:
sideshowbarker
2024-07-18 05:35:01 +09:00
Author: https://github.com/aJanuary Commit: https://github.com/SerenityOS/serenity/commit/f62ac5d81d8 Pull-request: https://github.com/SerenityOS/serenity/pull/9467
@ -40,7 +40,7 @@ KResultOr<NonnullRefPtr<Custody>> Custody::try_create(Custody* parent, StringVie
|
||||
if (!custody)
|
||||
return ENOMEM;
|
||||
|
||||
all_custodies.append(*custody);
|
||||
all_custodies.prepend(*custody);
|
||||
return custody.release_nonnull();
|
||||
});
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user