mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 14:18:12 +00: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
1 changed files with 1 additions and 1 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue