Notings of Attention™
Acmlmboard 2 Released
Github/GIT | @acmlmboard
Chatting Places
Discord

Affiliates
Super Mario Bros. X | Kuribo64
Views: 8,987,267
Main | FAQ | IRC chat | Memberlist | Active users | Latest posts | Stats | Ranks | Online users | Search
04-20-24 01:51 AM
Guest: Register | Login

0 users currently in AcmlmBoard Developer Zone | 1 bot

Main - AcmlmBoard Developer Zone - Post rendering optimization
Next newer thread | Next older thread


Arisotura
Posted on 10-16-15 12:29 AM (rev. 2 of 10-16-15 12:52 AM by Arisotura) Link | ID: 87732
Developer
pancakes
Level: 83


Posts: 897/1868
EXP: 5408922
Next: 23299

Since: 01-05-12
From: France

Last post: 677 days
Last view: 216 days
That's one thing, atleast on my board. Rendering posts takes time, and especially, running them through the post filter.


Some possible optimizations, mostly discussing them:


Storing posts preparsed to a point

* can't fully preparse them as some markup will be dynamic (/me, user tag, etc)
* very little work when rendering posts
* any change to markup requires reparsing all the posts (can be done by just marking them dirty and reparsing them when needed, but eh, complication)
* takes twice as much DB space (need to keep the original post)


Detecting which tags are present before running the postfilter
... and only running the needed filters

* would probably only benefit big posts if done on individual tags
* could benefit a lot of posts if done on a global level though (ie. if post contains no BBCode at all, skip a big chunk of the postfilter)



Oh and PHP also has an extension for parsing BBCode. It won't be available everywhere, but it's still worth looking into. They say it's faster than using regexes, and it looks flexible too.

____________________
Kuribo64 - melonDS

want some revolution in your coffee?

Arisotura
Posted on 10-18-15 08:44 PM Link | ID: 87753
Developer
pancakes
Level: 83


Posts: 899/1868
EXP: 5408922
Next: 23299

Since: 01-05-12
From: France

Last post: 677 days
Last view: 216 days
Well I applied the big optimization to my board (do not run BBCode filters if no BBCode is present)...


According to what I got, only 25% of the posts contain BBCode. Yet, the optimization gives little to no change.

____________________
Kuribo64 - melonDS

want some revolution in your coffee?

Next newer thread | Next older thread
Main - AcmlmBoard Developer Zone - Post rendering optimization


Acmlmboard v2.5.5 (10/04/2020)
© 2005-2024 Acmlm, Emuz, et al.

Page rendered in 0.036 seconds. (754KB of memory used)
MySQL - queries: 62, rows: 469/502, time: 0.030 seconds.