Points of Required Attention™
Acmlmboard 2 Released
Github/GIT | @acmlmboard | IRC: #abdev
Chatting Places
IRC: #kafuka | Discord

Affiliates
Super Mario Bros. X | Kuribo64
Views: 5,415,706
Main | FAQ | IRC chat | Memberlist | Active users | Latest posts | Calendar | Stats | Ranks | Online users | Search
08-18-18 11:03 AM
Guest: Register | Login

0 users currently in AcmlmBoard Developer Zone | 1 guest

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


StapleButter
Posted on 10-16-15 12:29 AM (rev. 2 of 10-16-15 12:52 AM by StapleButter) Link | ID: 87732
Developer
Acmlmboard has... side effects
Level: 72


Posts: 897/1609
EXP: 3172869
Next: 150893

Since: 01-05-12
From: France

Last post: 2 days
Last view: 15 hours
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 - we hack shit
obsolete advert is obsolete

StapleButter
Posted on 10-18-15 08:44 PM Link | ID: 87753
Developer
Acmlmboard has... side effects
Level: 72


Posts: 899/1609
EXP: 3172869
Next: 150893

Since: 01-05-12
From: France

Last post: 2 days
Last view: 15 hours
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 - we hack shit
obsolete advert is obsolete

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


Acmlmboard v2.5.4 (8/04/2018)
© 2005-2018 Acmlm, Emuz, et al.

Page rendered in 0.033 seconds. (702KB of memory used)
MySQL - queries: 59, rows: 439/472, time: 0.020 seconds.