Skip to content

Optimize Explore Albums

Eirik Steira requested to merge refactor/explore-albums into dev

Optimized explore albums to only fetch a single image as a preview. To accomplish this I had to increase the hibernate max connection pool size for concurrent loading and make EntityManagerFactory a singleton instead of EntityManager.

I was wrong in that an EntityManager that is a heavy recourse to create, it is EntityManagerFactory. I read the actual documentation.

In order to fire 50 concurrent requests to the db I had to create a new entity manager for each call to AlbumRepository.findPreviewImage

Merge request reports

Loading