[SMF 2.1 RC2] Queries with attachments in the message

Started by Massl, April 23, 2019, 04:15:54 PM

Previous topic - Next topic

Massl

Hi, I created a new topic with 10 images attached, is it normal that every time 97 queries are generated to display the discussion with only one message?
Default theme and language, no mod.

Thanks

albertlast

For rc2  is this behavior normal,
The next release got some optimizations to reduce the amount of queries.

Related issue: https://github.com/SimpleMachines/SMF2.1/issues/5492

Massl

Quote from: albertlast on April 24, 2019, 02:35:57 AM
For rc2  is this behavior normal

I didn't know, thanks.
I noticed it now because it occurs only when the attachments are inserted in the text of the message with
[attach id=xxx]test.png[/attach]
If I don't use inline attachments the queries decrease from 97 to 35.

Arantor

Even 35 is unreasonable when in 2.0 it took 1 query to get the attachments for the entire page.

albertlast

Well i got the pr running how reduce the amount of queries to one.
https://github.com/SimpleMachines/SMF2.1/pull/5615

When you want to test this,
a small warning:
Please had in mind that this changes are build around the existing changes of the next release are made.
So to take only the changes could create issue (you should at least all related pr add too).

Massl

Quote from: albertlast on April 24, 2019, 06:41:00 AM
Well i got the pr running how reduce the amount of queries to one.
https://github.com/SimpleMachines/SMF2.1/pull/5615

I have modified the files and queries decrease from 97 to 20  :laugh:
A topic without attachments takes 19 queries, great job thanks!

EDIT: I do not understand...
If I use the global moderator account the queries arrive at 70, I think there is another problem ...

Global moderator 70 queries, normal user 19 queries, admin 20 queries  ???



albertlast

Like i said ther are 3 pr related to this issue,
you should apply all of them.

Advertisement: