Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
+3 votes
641 views
in Q2A Core by
edited by

Avatar images are loading from the db in the form of data blobs, not files. e.g.

https://MySite...com/58139/?qa=image&qa_blobid=12980997095205344017&qa_size=30

and that slows down my website loading dramatically. even fetching small jpg files from db takes over 2 seconds!  

Any suggestions ?

Updated(March 12):
QA cache used MemCached ( earlier I used filesystem cuz memcached was not avaialbe, now I am ussing MemCached to make the screenshots below)

Q1: yes I was but disabled the clud flare and generated the following result

Q1&2: Both Could flare and QA cache disabled

Q1&2:Cloudflare: disabled QA: remain enabled

Q1&2: Cloudflare: disabled QA: disabled 

Q3: refer above please
Q4:pressing favorite star Cloudflare: disabled QA: disabled 

Q4:pressing favorite star Cloudflare: disabled QA: enabled ( repeated multiple times)

Q2A version: 1.85
by
Seems to me data blobs don't get cached
by
+1
I'm still missing an answer to questions 2 and 4.

Clarification on 2: I want to see if the Q2A cache is making the results faster or slower. As you've changed both caches, I can't tell. Disable cloudfare and leave the Q2A cache (which I guess it is the Filesystem one) and provide an additional screenshot

Clarification on 4: I just want to see how long it takes to favorite/unfavorite a question. Those are the steps to follow
by
Generated new screenshots and inserted into the post. Thank you
by
OK, we can confirm Q2A's cache is irrelevant, from the images. However, it makes sense, as the images are not really using what you configure in admin/caching (I actually thought they were).

1. How many records does the ^cache table have?

2. Edit file qa-include/qa-image.php and comment these lines:
$content = qa_db_cache_get($cachetype, $blobid);
... and also ...
if (array_search($size, $cachesizes))
    qa_db_cache_set($cachetype, $blobid, $content);

Once you have done this run the tests with cloudflare and QA cache disabled (in order to keep tests as similar as possible).

When running the tests, make sure to check the "Disable cache" checkbox in the Network tab of the Chrome inspector

3. Have you changed the default value of QA_DB_MAX_CACHE_AGE (which is 86400)?

4. If you try to access the URL of a single file, for example, the URL with the blobid 7639... at the bottom of the last image, how much does it take? Make sure it is the same URL (exactly, with the same size). Make 2 tests here: test with the original code and also with the change I suggested in item 2.

Please log in or register to answer this question.

...