Skip to content

Media: listAll: Remove useless join

All the information we need is available in the Media table.

This saves a bit of time for each request:

before:

---------------------------------------------------------------
Benchmark                     Time             CPU   Iterations
---------------------------------------------------------------
ListAllAudioMedia/2        9065 ns         9065 ns        77734
ListAllAudioMedia/3        9528 ns         9502 ns        79930
ListAllAudioMedia/5        9178 ns         9178 ns        73146
ListAllAudioMedia/8        9691 ns         9691 ns        74533
ListAllAudioMedia/10       9230 ns         9230 ns        76966
ListAllAudioMedia/4        9144 ns         9144 ns        76804
ListAllAudioMedia/6        9114 ns         9114 ns        77136
ListAllAudioMedia/9        9291 ns         9290 ns        75612
ListAllAudioMedia/7        9380 ns         9380 ns        74130
ListAllAudioMedia/12       9356 ns         9355 ns        75969
ListAllAudioMedia/1        9077 ns         9077 ns        77175

after:

---------------------------------------------------------------
Benchmark                     Time             CPU   Iterations
---------------------------------------------------------------
ListAllAudioMedia/2        7871 ns         7871 ns        89376
ListAllAudioMedia/3        7933 ns         7933 ns        87642
ListAllAudioMedia/5        7918 ns         7918 ns        88044
ListAllAudioMedia/8        7846 ns         7846 ns        88684
ListAllAudioMedia/10       8112 ns         8112 ns        88980
ListAllAudioMedia/4        8418 ns         8418 ns        83446
ListAllAudioMedia/6        8532 ns         8532 ns        83771
ListAllAudioMedia/9        8523 ns         8523 ns        82545
ListAllAudioMedia/7        8484 ns         8484 ns        81903
ListAllAudioMedia/12       8369 ns         8369 ns        81180
ListAllAudioMedia/1        7924 ns         7924 ns        88147

Merge request reports

Loading