BWindow: Use a SplayTree to store shortcuts.
This makes for much faster lookups, and avoids the need to allocate an array. sizeof(BWindow) is unchanged (on x86_64, 504; on x86, 376) so this should not break ABI/API. Quick benchmark in Tracker: 501 lookups, before: ~488 usec 501 lookups, after: ~284 usec Change-Id: Ica2c728f0c5957380add53e14a826a4aade52df0 Reviewed-on: https://review.haiku-os.org/c/haiku/+/10720 Tested-by: Commit checker robot <[email protected]> Reviewed-by: waddlesplash <[email protected]>
This commit is contained in:
committed by
waddlesplash
parent
fd2113c61a
commit
ad37e9a395
@@ -381,7 +381,9 @@ private:
|
||||
uint32 _unused1;
|
||||
BMenuBar* fKeyMenuBar;
|
||||
BButton* fDefaultButton;
|
||||
BList fShortcuts;
|
||||
void* fShortcuts;
|
||||
void* _unused2;
|
||||
int32 _unused3[5];
|
||||
int32 fTopViewToken;
|
||||
bool fUpdateRequested;
|
||||
bool fOffscreen;
|
||||
|
||||
Reference in New Issue
Block a user