| Summary: | Reduce allocations in DatabaseUtilities::sortedTables | ||||||
|---|---|---|---|---|---|---|---|
| Product: | WebKit | Reporter: | Alex Christensen <achristensen> | ||||
| Component: | New Bugs | Assignee: | 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
Alex Christensen
2021-09-28 20:12:50 PDT
Created attachment 439561 [details]
Patch
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>& ? Because they have different sizes. std::array has a template parameter that is its size, so they would return different types. 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]. 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? 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. |