2 ms·
Gallery code that queries all photos and shows them to the user. It had a 13 sec delay with 10k photos and above. I thought it was a Big O problem at first, be
by muzani 6y ago
Gallery code that queries all photos and shows them to the user. It had a 13 sec delay with 10k photos and above.
I thought it was a Big O problem at first, because the code was hacky and used more Arrays that it needed. But it was because it was obtaining all images and then sorting them by time.
I sped it up to milliseconds by making the queries sorted by time.