RESOLVED FIXED 145526
[Content Extensions] Reduce DFA memory usage.
https://bugs.webkit.org/show_bug.cgi?id=145526
Summary [Content Extensions] Reduce DFA memory usage.
Alex Christensen
Reported 2015-06-01 14:32:47 PDT
std::pair<uint8_t, uint32_t> uses 8 bytes per transition, but we can reduce the memory usage of the DFA by about 3/8 by separating the characters from the destinations.
Attachments
Patch (10.77 KB, patch)
2015-06-01 14:34 PDT, Alex Christensen
benjamin: review+
Alex Christensen
Comment 1 2015-06-01 14:34:23 PDT
Benjamin Poulain
Comment 2 2015-06-01 15:24:11 PDT
Comment on attachment 254013 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=254013&action=review > Source/WebCore/contentextensions/DFA.cpp:43 > + + transitionCharacters.size() * sizeof(uint8_t) > + + transitionDestinations.size() * sizeof(uint8_t) This should be capacity(), not size().
Alex Christensen
Comment 3 2015-06-01 15:29:34 PDT
Comment on attachment 254013 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=254013&action=review >> Source/WebCore/contentextensions/DFA.cpp:43 >> + + transitionDestinations.size() * sizeof(uint8_t) > > This should be capacity(), not size(). And destinations are uint32_t.
Alex Christensen
Comment 4 2015-06-01 15:30:10 PDT
Note You need to log in before you can comment on or make changes to this bug.