I've discovered an issue involving attachment.php which likely impacts most image-centric sites:
* Please bear in mind that I'm not a programmer -- the essence of what I'm saying appears to be correct but my theory/explanation might be somewhat inaccurate
I rely heavily on thumbnails (an average thread page on my site contains around 50) -- the image source for thumbnails runs attachment.php (src="attachment.php?thumbnail=100320").
Once a thread loads, attachment.php is executed for every single thumbnail and pulls the proper AID from a string (PID-based) generated in showthread.php. In other words, MyBB pulls thumbnail images through an intermediate script. As you can imagine, when attachment.php is loaded 50 times by ONE user in response to loading one page (on a forum with around 100 guests and members browsing around) the whole thing bogs down. I understand the intent (my guess is to conceal actual files names) but it's a huge waste of resources.
Does anyone know of a concrete way of modifying showthread.php to simply echo the path, name and format of thumbnail images (which are stored in uploads) and link them to the appropriate attachment ID inside a post? Under this configuration, only after clicking a thumbnail would attachment.php run -- the browser would pull thumbnail images directly. The downside is the location and names of image files would be visible.
Alternatively, maybe there's a way of handling thumbnails with a separate script that's called once per post (one time for multiple thumbnails).
This seems to be the reason my site runs like crap.
* Please bear in mind that I'm not a programmer -- the essence of what I'm saying appears to be correct but my theory/explanation might be somewhat inaccurate
I rely heavily on thumbnails (an average thread page on my site contains around 50) -- the image source for thumbnails runs attachment.php (src="attachment.php?thumbnail=100320").
Once a thread loads, attachment.php is executed for every single thumbnail and pulls the proper AID from a string (PID-based) generated in showthread.php. In other words, MyBB pulls thumbnail images through an intermediate script. As you can imagine, when attachment.php is loaded 50 times by ONE user in response to loading one page (on a forum with around 100 guests and members browsing around) the whole thing bogs down. I understand the intent (my guess is to conceal actual files names) but it's a huge waste of resources.
Does anyone know of a concrete way of modifying showthread.php to simply echo the path, name and format of thumbnail images (which are stored in uploads) and link them to the appropriate attachment ID inside a post? Under this configuration, only after clicking a thumbnail would attachment.php run -- the browser would pull thumbnail images directly. The downside is the location and names of image files would be visible.
Alternatively, maybe there's a way of handling thumbnails with a separate script that's called once per post (one time for multiple thumbnails).
This seems to be the reason my site runs like crap.