Skip to:

Re: plugin: bb-Polls



example of when serializing is bad:

a loop of 50 topics being displayed where the data has to be unserialized each and every time because of the way the data is fetched – it’s very easy to accidentally make this happen

fortunately polls are only displayed on the topic page where the data has already been fetched from the db and deserialized once

What bothers me even more however is using things like is_topic() which can get caught within the topic list loop on the front-page/forum page, because of how much work it does and how repetitive it is without being cached.

Unfortunately I cannot figure out a less intensive way and it can’t be cached. bbpress should be storing a simple string flag for it the moment it determines its heading towards that template, not post-processed by looking at the filenames. The difference in overhead is significant.

ps. actually, I just realised I am doing that bad version of deserializing. I have to trick bbpress not to deserialize all that data… will work on it

Skip to toolbar