Commit 54d6570
authored
Get cache size from leveldb for mutable cache (#1215)
Old approach with evaluating cache size is quite inefficient and causes
slowdowns for the users. Instead evaluating initial cache size with a
leveldb routine GetApproximateSize(). Performance improvement here is
open now up to x200-x300 times faster. Broken cache size could be also
checked without any memory consumption spikes.
Relates-To: OLPSUP-14421
Signed-off-by: Andrey Kashcheev <[email protected]>1 parent 94277a5 commit 54d6570
File tree
2 files changed
+33
-26
lines changed- olp-cpp-sdk-core
- src/cache
- tests/cache
2 files changed
+33
-26
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
501 | 501 | | |
502 | 502 | | |
503 | 503 | | |
| 504 | + | |
| 505 | + | |
| 506 | + | |
504 | 507 | | |
505 | | - | |
506 | | - | |
507 | | - | |
508 | | - | |
509 | | - | |
510 | | - | |
| 508 | + | |
| 509 | + | |
| 510 | + | |
511 | 511 | | |
512 | 512 | | |
513 | | - | |
514 | 513 | | |
515 | 514 | | |
516 | 515 | | |
| |||
519 | 518 | | |
520 | 519 | | |
521 | 520 | | |
522 | | - | |
523 | | - | |
524 | | - | |
| 521 | + | |
| 522 | + | |
525 | 523 | | |
526 | 524 | | |
527 | 525 | | |
528 | | - | |
529 | | - | |
| 526 | + | |
| 527 | + | |
530 | 528 | | |
531 | 529 | | |
532 | 530 | | |
| |||
870 | 868 | | |
871 | 869 | | |
872 | 870 | | |
873 | | - | |
| 871 | + | |
| 872 | + | |
| 873 | + | |
| 874 | + | |
| 875 | + | |
| 876 | + | |
874 | 877 | | |
875 | 878 | | |
876 | 879 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
| 37 | + | |
37 | 38 | | |
38 | | - | |
| 39 | + | |
39 | 40 | | |
40 | 41 | | |
41 | 42 | | |
42 | 43 | | |
43 | 44 | | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
44 | 58 | | |
45 | 59 | | |
46 | 60 | | |
| |||
570 | 584 | | |
571 | 585 | | |
572 | 586 | | |
573 | | - | |
574 | 587 | | |
575 | 588 | | |
576 | 589 | | |
577 | 590 | | |
578 | | - | |
| 591 | + | |
579 | 592 | | |
580 | 593 | | |
581 | 594 | | |
| |||
1283 | 1296 | | |
1284 | 1297 | | |
1285 | 1298 | | |
1286 | | - | |
1287 | | - | |
1288 | | - | |
1289 | | - | |
1290 | | - | |
1291 | | - | |
1292 | | - | |
1293 | | - | |
1294 | | - | |
1295 | | - | |
| 1299 | + | |
1296 | 1300 | | |
1297 | 1301 | | |
1298 | 1302 | | |
| |||
0 commit comments