plan2net / webp

Create a WebP copy for images (TYPO3 CMS)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Hundreds of queries to check for failed attempts really neccesary?

bernhardberger opened this issue · comments

if ($this->hasFailedAttempt((int)$originalFile->getUid(), $parameters)) {

Is this check really neccesary? This causes a butload of queries.

My scenario:

  • I have a site (single page) with about 100 images
  • if I include responsive formats multiply that by 4-6
  • this site has heavy traffic (about 2000 concurrent fe_users during business hours and probably 1000 hits per minute as the page autoloads when a users opens the browser or just a new tab

Results in:
500 * 1000 = 0.5 mio queries per minute for that check alone.

Can this be optimized? I'm happy to submit a PR if anyone suggest an approach..

Merged 261f861
Should be a lot faster now, but why would heavy traffic have any impact on this? The images are generated usually once (see

if (!$this->needsReprocessing($processedFileWebp)) {
).
Maybe you can give some insights into your setup, why processing these images would be called all the time?

Maybe you can give some insights into your setup, why processing these images would be called all the time?

Would be interested too

Is this check really neccesary? This causes a butload of queries.

btw, it is buttload