Bug 230933

Summary: Reduce allocations in DatabaseUtilities::sortedTables
Product: WebKit Reporter: Alex Christensen <achristensen>
Component: New BugsAssignee: Alex Christensen <achristensen>
Status: RESOLVED FIXED    
Severity: Normal CC: cdumez, darin, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch none

Alex Christensen
Reported 2021-09-28 20:12:50 PDT
Reduce allocations in DatabaseUtilities::sortedTables
Attachments
Patch (7.46 KB, patch)
2021-09-28 20:13 PDT, Alex Christensen
no flags
Alex Christensen
Comment 1 2021-09-28 20:13:52 PDT
Chris Dumez
Comment 2 2021-09-28 20:21:49 PDT
Comment on attachment 439561 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=439561&action=review > Source/WebKit/NetworkProcess/Classifier/ResourceLoadStatisticsDatabaseStore.cpp:276 > +Span<const ASCIILiteral> ResourceLoadStatisticsDatabaseStore::sortedTables() Why return a span and not a const std::array<ASCIILiteral>& ?
Alex Christensen
Comment 3 2021-09-28 22:00:50 PDT
Because they have different sizes. std::array has a template parameter that is its size, so they would return different types.
EWS
Comment 4 2021-09-29 09:28:55 PDT
Committed r283227 (242269@main): <https://commits.webkit.org/242269@main> All reviewed patches have been landed. Closing bug and clearing flags on attachment 439561 [details].
Radar WebKit Bug Importer
Comment 5 2021-09-29 09:29:20 PDT
Darin Adler
Comment 6 2021-10-01 16:12:43 PDT
Comment on attachment 439561 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=439561&action=review > Source/WebKit/NetworkProcess/PrivateClickMeasurement/PrivateClickMeasurementDatabase.cpp:116 > + static std::array sortedTables { Why not constexpr?
Alex Christensen
Comment 7 2021-10-01 16:15:08 PDT
Comment on attachment 439561 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=439561&action=review >> Source/WebKit/NetworkProcess/PrivateClickMeasurement/PrivateClickMeasurementDatabase.cpp:116 >> + static std::array sortedTables { > > Why not constexpr? indeed. That could be added. I missed that.
Note You need to log in before you can comment on or make changes to this bug.