Faster parsesmileys

Started by Joshua Dickerson, October 14, 2009, 06:02:30 PM

Previous topic - Next topic

Joshua Dickerson

Link to Mod

This will make your smileys parse faster and your pages load faster. It removes some functionality. For instance a-z 0-9, _, a comma, +, =, %, $, ~ can now come before a smiley a:) will become a smiley now.
Come work with me at Promenade Group



Need help? See the wiki. Want to help SMF? See the wiki!

Did you know you can help develop SMF? See us on Github.

How have you bettered the world today?


aED

I did not fully understand your explanation can you please elaborate more... And do you have any testing results that it can really make your page load faster?

Joshua Dickerson

Simply put, it changes a long complicated regular expression to strtr() which is significantly faster. It also removes some extra calls needed to do that regex - another thing that makes it faster. It isn't going to make it a lot faster, but it does reduce a lot of parsing which should save on resources.
Come work with me at Promenade Group



Need help? See the wiki. Want to help SMF? See the wiki!

Did you know you can help develop SMF? See us on Github.

How have you bettered the world today?

aED


Blah blah

Hmm this looks interesting for sure and useful :)

Any testing? Any problems with other mods?

Joshua Dickerson

I tested it with a vanilla installation. It probably doesn't affect other mods since I doubt there are many that mess with parsesmileys()
Come work with me at Promenade Group



Need help? See the wiki. Want to help SMF? See the wiki!

Did you know you can help develop SMF? See us on Github.

How have you bettered the world today?

Blah blah

I just installed and Im very impressed at how much faster they load now  :)

1 Up  :D

C4G-TK

I'm noticing a small problem.  With this mod installed, there is some kind of conflict with SimplePortal from what I can tell.  The portal page hangs and hangs and won't load, but all other pages load fine.  This is regardless of whether I am signed into the forum or not.

Do you know why this would be happening?  I had to uninstall manually in order to sign back into the forum otherwise, people would not be able to get to my site.

-img removed-

Blah blah

Thats weird. I have SP and 2.0.12 with no problem

C4G-TK

I'll add it in again later at another time to see if it was just a fluke.  I installed and uninstalled twice and got the same results.

-img removed-

gm112

Quote from: groundup on October 14, 2009, 06:02:30 PM
Link to Mod

This will make your smileys parse faster and your pages load faster. It removes some functionality. For instance a-z 0-9, _, a comma, +, =, %, $, ~ can now come before a smiley a:) will become a smiley now.
For some reason, the script execution time exceeds 30 seconds after using certain smileys.. can't figure out which, though. :(

Joshua Dickerson

What SMF version are you using?
Come work with me at Promenade Group



Need help? See the wiki. Want to help SMF? See the wiki!

Did you know you can help develop SMF? See us on Github.

How have you bettered the world today?

gm112

Quote from: groundup on October 26, 2009, 06:33:46 PM
What SMF version are you using?
I'm using SMF2 RC2.1. Sorry I forgot to specify that >_<..

c23_Mike

Hi there !

Will that mod work with RC3?
So long, Mike

http://www.c23.at
c23 - DER Computer Club
~ never play alone ~

Joshua Dickerson

Haven't tested it on it but I think it will work. I don't recall any changes with parsesmileys() in the last couple of releases. So, install it. If it gives you errors, I'll try to give you solutions.
Come work with me at Promenade Group



Need help? See the wiki. Want to help SMF? See the wiki!

Did you know you can help develop SMF? See us on Github.

How have you bettered the world today?

Joker™

working perfectly fine with RC3
Github Profile
Android apps
Medium

How to enable Post Moderation

"For the wise man looks into space and he knows there is no limited dimensions." - Laozi

All support seeking PM's get microwaved

T3CHN0

can anyone tell me, is this mod still usable with 2.0.1 or does 2.0.1 have this included in it now?

Joshua Dickerson

Pretty sure it isn't in 2.0.1 but it probably works on it.
Come work with me at Promenade Group



Need help? See the wiki. Want to help SMF? See the wiki!

Did you know you can help develop SMF? See us on Github.

How have you bettered the world today?

T3CHN0

thanks for that. just installed it on 2.0.1 to easy...
cheers

Advertisement: