ogri-la / strongbox

a World of Warcraft Addon Manager aimed at Linux players
GNU Affero General Public License v3.0
169 stars 7 forks source link

search, speeds search results up two orders of magnitude. #291

Closed torkus closed 3 years ago

torkus commented 3 years ago

while searching ~16k addons for "world of warcraft"

99% ≤ 209.45μs

to

99% ≤ 2.39μs

I knew it was slow, but damn ...

torkus commented 3 years ago

before

pId                   nCalls        Min      50% ≤      90% ≤      95% ≤      99% ≤        Max       Mean   MAD      Clock  Total

:op                       20   422.17ms   424.05ms   425.53ms   438.36ms   438.87ms   438.87ms   425.32ms   ±1%     8.51s    100%
:p3/db-partition          20   421.79ms   423.67ms   425.17ms   437.22ms   438.50ms   438.50ms   424.91ms   ±1%     8.50s    100%
:p3/db-search-row    309,980   252.00ns     5.53μs    77.54μs   117.99μs   209.45μs     1.67ms    27.26μs ±114%     8.45s     99%

Accounted                                                                                                          25.46s    299%
Clock                                                                                                               8.51s    100%

after

strongbox.main=> 
pId                   nCalls        Min      50% ≤      90% ≤      95% ≤      99% ≤        Max       Mean   MAD      Clock  Total

:op                       20    14.36ms    14.85ms    16.90ms    28.78ms    43.43ms    43.43ms    17.08ms  ±22%   341.54ms   100%
:p3/db-partition          20    14.19ms    14.66ms    16.67ms    28.50ms    43.25ms    43.25ms    16.88ms  ±22%   337.69ms    99%
:p3/db-search-row    309,980   185.00ns   782.00ns     1.39μs     1.62μs     2.39μs    28.28ms   958.18ns  ±47%   297.02ms    87%

Accounted                                                                                                         976.25ms   286%
Clock                                                                                                             341.65ms   100%