PDA

View Full Version : Would this hack slaughter performance?


VodkaFish
09-30-2004, 02:54 PM
I'm thinking of making a hack for my hockey site that goes like this:
I have team pages (player pages too)... and when people post to the board I'd like the names of teams to be automatically converted. So, I'd like a search and replace so when someone types New York Islanders, that would be linked to the team page. What I did do is create a separate bbcode for it, in case the url of the page changes later, so it'd be something like New York Islanders. Of course, I'd like to do this for the players too.

So is combing a message for a string and replacing it with the custom bbcode wrapped around the string going to slow things down much?

Xenon
09-30-2004, 03:39 PM
well, every bbcode slows things down, but it is really marginal.

Also you can enable post caching, then it's no problem at all, as posts aren't parsed several times then :)

Regs
09-30-2004, 03:57 PM
I *think* I remember reading about a hack here that did what you're talking about VF... the name escapes me right now but maybe someone else remembers?

Cheers,

~Regs.

VodkaFish
09-30-2004, 04:12 PM
I *think* I remember reading about a hack here that did what you're talking about VF... the name escapes me right now but maybe someone else remembers?

Cheers,

~Regs.
Wow, that'd be nice if this was done already, then all I'd have to do is change a few table names and I'd be set. I did some searching, haven't found it yet though...

Regs
09-30-2004, 09:58 PM
maybe it wasn't a hack... there's lots of discussion here though on the topic using replacement variables .

Do a search here on: replacement variables

That should be a start.

Cheers,

~Regs.