Bug 144277

Summary: Reduce allocations and memory usage when compiling content extensions.
Product: WebKit Reporter: Alex Christensen <achristensen>
Component: WebCore Misc.Assignee: Alex Christensen <achristensen>
Status: RESOLVED FIXED    
Severity: Normal    
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch benjamin: review+

Alex Christensen
Reported 2015-04-27 14:20:34 PDT
The BitVector in Term always has capacity of 128, so it always allocates 16 bytes in addition to a pointer to the allocated buffer and additional malloc overhead. Let's just have the 16 bytes.
Attachments
Patch (7.20 KB, patch)
2015-04-27 14:22 PDT, Alex Christensen
benjamin: review+
Alex Christensen
Comment 1 2015-04-27 14:22:24 PDT
Benjamin Poulain
Comment 2 2015-04-27 14:46:08 PDT
Comment on attachment 251776 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=251776&action=review Can you remove the #include <BitVector>? > Source/WebCore/contentextensions/Term.h:131 > + void set(unsigned character) unsigned -> UChar? > Source/WebCore/contentextensions/Term.h:137 > + bool get(unsigned character) const ditto.
Alex Christensen
Comment 3 2015-04-27 15:36:38 PDT
Note You need to log in before you can comment on or make changes to this bug.