Re: BBC Parsing
Reply #31 –
I don't know what you guys are doing but I'm glad that you are giving so much attention to speed.
If can be useful I can provide my login details to my linode vps where you can switch from php 5.4, 5.5 or 5.6 with just some clicks. I'm in holiday right now but I'll be back in a few days. Just let me know if could be useful for your tests
Re: BBC Parsing
Reply #32 –
Cool. Taking a look at it now. Got a screw in my tire so I am going to run to get that fixed in a minute. I think I'm going to add the glow tag back in by using a hook. It would then be able to test that adding tags by hooks works. I was saddened that you didn't have as much fun as I did with the messages. It's a glimpse in to my mind as it goes throughout the day hehe
Re: BBC Parsing
Reply #36 –
One of the messages contains an autolink to his FB profile.
My monitor keeps shutting down and Vagrant/VirtualBox are having problems with Win 10 but I initialized the repo in PhpStorm. So, at least I'm tracking changes now.
Re: BBC Parsing
Reply #39 –
Maybe I'll shamelessly add my LinkedIn profile for advertising lol
Re: BBC Parsing
Reply #43 –
Finally got it working with all of your messages. It added a ton of time to the tests but I finally wrangled it down. On 500 iterations, I am getting a difference of 0.61 seconds or 5.44%. That's completely negligible if we're parsing 500 crazy messages like these are.
I have to go away for the weekend so I am going to post this here. I have to leave in a few minutes so I don't have time to setup the Github repo.
Going with the iterative idea of this, before I switch all of my attention to the regular expression version, I want to change the codes array to use [1st char] => array([tag] => array(code, code, code...), tag => array(code) ) ). Also, instead of passing the disabled array to the validate/test functions, I want to pass the BBC object.
There a bunch of things I started working on so I don't forget them in the zip. I don't know if I applied all of your changes, but I purposefully skipped some of them.