My-Little-Forum / mylittleforum

A simple PHP and MySQL based internet forum that displays the messages in classical threaded view (tree structure)
GNU General Public License v3.0
124 stars 48 forks source link

Loading the main page (thread listing) stalls up to a few seconds #617

Open auge8472 opened 2 years ago

auge8472 commented 2 years ago

This is regulary visible on mobile devices [edit](iPhone SE, iOS 15.6)[/edit]. The loading process halts after the block with the latest entries and seems to wait for the tag-cloud-block. When the tag-cloud-block gets visible, the rest of the page (admin options in the sidebar/bottombar and the thread listing) loads more or less immediately.

auge8472 commented 2 years ago

This happens not in desktop browsers (Firefox, Chromium-based-browsers on Windows 10, Ubuntu 18.04 and Ubuntu 20.04). I have to apply further tests on Android devices.

auge8472 commented 1 year ago

Meanwhile I think, this has to do with the common database performance issues, described in #673 and the forum thread, that is linked in the other issue.

joeiacoponi1 commented 6 months ago

Looking back at older issues, I am not able to duplicate this in the current version of iOS (17.4.1) and Safari or Firefox with either base MLF 20240308.1 or the sql performance modified 20240308.1.

@auge8472, I am curious if this issue has now been resolved either via iOS upgrade or latest 20240308.1 version.

auge8472 commented 6 months ago

… I am not able to duplicate this in the current version of iOS (17.4.1) and Safari or Firefox with either base MLF 20240308.1 or the sql performance modified 20240308.1.

@auge8472, I am curious if this issue has now been resolved either via iOS upgrade or latest 20240308.1 version.

I am also on iOS 17.4.1 (iPone SE 2022) and if I open the project forum in Safari or Firefox the pages load at a normal speed. But on the other side, if I open a page on the forum website from my RSS reader (NetNewsWire), I see the stall, when I marked a posting as spam and the forum script loads the main page after deleting a spam posting. Then it loads the latest postings (in the thread main view) and stops to load the tag cloud. Therefore it needs up to a few seconds.

I don't know if this webview is a system app (like on Android) or if the RSS reader brings its own webview with it. Obviously it's not the system browser (Safari) and also not the meanwhile (with its native engine) installable Firefox because both browsers do not show the stalls when loading the same page.

The moment, when the stalls (visibly) occure, made me curious and inspecting the DOM of this section. To map the weighting of the tags against each other semantically, they are nested in different numbers of elements of the type strong. Currently there are only three tags in the project forum (als seen in the code example below) but it'a also possible to have a much bigger amount of tags.

<div id="tagcloud">
 <h3>aktuelle Tags</h3>
 <p id="tagcloud-container">
  <strong>
   <strong>
    <strong>
     <strong>
      <a href="index.php?mode=search&amp;search=development&amp;method=tags">development</a> 
     </strong>
    </strong>
   </strong>
  </strong>
  <strong>
   <strong>
    <strong>
     <strong>
      <a href="index.php?mode=search&amp;search=testing&amp;method=tags">testing</a> 
     </strong>
    </strong>
   </strong>
  </strong>
  <a href="index.php?mode=search&amp;search=upgrade&amp;method=tags">upgrade</a>
 </p>
</div>

For me it looks plausible, that this strongly nested construction of elements of the same type could lead to rendering issues. But that's just a guess so far. If I find evidence for my assumption we have to rethink the HTML-structure of the tag cloud.

auge8472 commented 2 months ago

After the upgrade to version 20240729.1, which includes noticeable performance enhancements in the overview pages, the performance did improve. As said in my previous comment, the performance in the system browser was already satisfying before. Only in the webview, that is called from the RSS reader, the performance was far from satisfying. Event there it was improved with the upgrade but IMHO it is still not solved.

Time to take a look into the HTML-code to to confirm or refute my assumption regarding the tag cloud.