mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-02-21 15:14:13 +00:00
Reduce kmalloc() traffic in directory iteration.
Pass the file name in a stack-allocated buffer instead of using an AK::String when iterating directories. This dramatically reduces the amount of cycles spent traversing the filesystem.
This commit is contained in:
@@ -35,7 +35,10 @@ public:
|
||||
virtual Unix::ssize_t readInodeBytes(InodeIdentifier, Unix::off_t offset, Unix::size_t count, byte* buffer, FileDescriptor*) const = 0;
|
||||
|
||||
struct DirectoryEntry {
|
||||
String name;
|
||||
DirectoryEntry(const char* name, InodeIdentifier, byte fileType);
|
||||
DirectoryEntry(const char* name, Unix::size_t name_length, InodeIdentifier, byte fileType);
|
||||
char name[256];
|
||||
Unix::size_t name_length { 0 };
|
||||
InodeIdentifier inode;
|
||||
byte fileType { 0 };
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user