Media Library Performance & Optimization Improvements
- Use guid instead of media_item_id for sort disambiguator - 1
- Use jemalloc as our allocator - 2
- Use media_item_id as a foreign key in resource_properties rather than guid - 3
- Maintain database tables of distinct values for some properties - 3
- Sort rows in memory when possible - 2
- Create sbGUID and sbGUIDHashKey - 2
Performance on 0.5
| | 5000 | 10000 | 25000 | 50000 | 100000 |
|---|---|---|---|---|---|
| guidarray single toplevel sort | 69 | 83 | 133 | 210 | 344 |
| guidarray standard distinct | 173 | 376 | 1059 | 3587 | 6988 |
| guidarray standard sort | 301 | 404 | 745 | 1318 | 2374 |
Performance with bug 8247 fixed:
| | 5000 | 10000 | 25000 | 50000 | 100000 |
|---|---|---|---|---|---|
| guidarray single toplevel sort | 38 | 47 | 75 | 119 | 195 |
| guidarray standard distinct | 48 | 98 | 249 | 709 | 1356 |
| guidarray standard sort | 166 | 174 | 206 | 282 | 412 |
Other candidates:
- Q) Are we going to support legacy profiles for 0.6? Do we need a migration script?
- A) Daniel said no - we are a small startup with a product with not many users. We plan to make more changes to DB as we see fit between now and mass-launch.




