Following #972 and b29ab344e9 it seems the 30k threshold is a bit high. For example, on a low energy CPU server on Piwigo.com, an album containing 19k photos made the SQL query run for a huge 98 seconds.
Let's lower the limit to 1k. The pure PHP solution remains fine.
Actually, this calculation (of the number of photos that would become orphan if the album was deleted) should be done only if the administrator asks for deletion. Totally useless 99% of the time.
Following #972 and b29ab344e9d727f483613f244d11e8971cb03df1 it seems the 30k threshold is a bit high. For example, on a low energy CPU server on Piwigo.com, an album containing 19k photos made the SQL query run for a huge 98 seconds.
Let's lower the limit to 1k. The pure PHP solution remains fine.
Actually, this calculation (of the number of photos that would become orphan if the album was deleted) should be done **only** if the administrator asks for deletion. Totally useless 99% of the time.
<!-- github-sync-id:856687183 -->
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Following #972 and
b29ab344e9it seems the 30k threshold is a bit high. For example, on a low energy CPU server on Piwigo.com, an album containing 19k photos made the SQL query run for a huge 98 seconds.Let's lower the limit to 1k. The pure PHP solution remains fine.
Actually, this calculation (of the number of photos that would become orphan if the album was deleted) should be done only if the administrator asks for deletion. Totally useless 99% of the time.