User tests: Successful: Unsuccessful:
Pull Request for Issue #28610 .
During article hit counter increment there is an additional #content table read which produces unwanted Db load and network trafic.
components/com_content/models/article.php
Changes in the method that Increments the hit counter for the article.
public function hit($pk = 0)
Before the actual update
$table->hit($pk);
It reads required row from the content table $table->load($pk);.
That selects all columns including "fulltext" which can be quite big.
That redundant select produces additional network and DB load.
Check the hit counter for an article.
Visit the article on the frontend.
Check the hit counter again.
In DB queries log should NOT be present request:
"SELECT * FROM #_content WHERE
id = 'XXX'"
Where XXX is the visited article Id.
After visit the article page hit counter should be incremented by 1.
No request performed "SELECT * FROM #_content WHERE
id = 'XXX'"
Request is performed:
"SELECT * FROM #_content WHERE
id = 'XXX'"
No
Status | New | ⇒ | Pending |
Category | ⇒ | Front End com_content |
Title |
|
Title |
|
Labels |
Added:
?
|
Category | Front End com_content | ⇒ | Front End com_contact com_content com_newsfeeds com_tags |
I have tested this item
I have tested this item
tested successfully on 3.9.17 dev of 20200412
Status | Pending | ⇒ | Ready to Commit |
RTC
Status | Ready to Commit | ⇒ | Fixed in Code Base |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2020-04-12 08:44:22 |
Closed_By | ⇒ | HLeithner | |
Labels |
Added:
?
|
Thanks
Can you make the same change in other components as well?