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

Affiliates
Super Mario Bros. X | Kuribo64 | NeoRHDN
Views: 11,030,476
Main | FAQ | IRC chat | Memberlist | Active users | Latest posts | Stats | Ranks | Online users | Search
11-21-24 11:56 AM
Guest: Register | Login

0 users currently in AcmlmBoard Developer Zone | 4 bots

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: 84


Posts: 897/1870
EXP: 5546096
Next: 115856

Since: 01-05-12
From: France

Last post: 37 days
Last view: 37 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: 84


Posts: 899/1870
EXP: 5546096
Next: 115856

Since: 01-05-12
From: France

Last post: 37 days
Last view: 37 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.6 (06/11/2024)
© 2005-2024 Acmlm, Emuz, et al.

Page rendered in 3.296 seconds. (754KB of memory used)
MySQL - queries: 62, rows: 473/506, time: 3.252 seconds.