-
Notifications
You must be signed in to change notification settings - Fork 28
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Performance Issue with RegularParser
#27
Comments
@rhukster Just wanted to clarify: this is not what I believe to be related, I know that it's caused by many unclosed shortcodes, because such input causes |
You might want to look at my "Ideas" suggestions that could help with performance here. Cheers! |
@rhukster I merged the performance improvements PR to master, but I found some issues with parsing correctness when dealing with complex nested cases so please use |
I just tested your latest dev-master. The RegularParser is now much improved! As you say it renders in about 500ms on the 'test page'. No more errors and timeouts! I'll probably continue to use Regex or Wordpress parser as they are an order of magnitude faster still (Regex ~40ms, and Wordpress ~20ms). What would the advantage be to using the RegularParser over the Regex or Wordpress one? |
Thanks, could you also help @giansi resolve problems in #29? If you say that this issue is resolved, I only need to know if his issue is something to fix before tagging new release. As for the advantages of |
As outlined in the original PR comment: #26 (comment), I was testing the
Shortcode
against some documentation I have for Grav CMS where I have created a Tab shortcode. I was running into a couple of issues, but one of them is related to very slow parsing of this example page with theRegularParser
.After a few back and discussions with @thunderer, he believes it is related to the various non-shortcode
[]
references contained in the document.I have put together a simple test scenario (https://github.com/rhukster/shortcode-test) that shows this issue. There are two documents, a small one that is considerably slower than either the
RegexParser
or theWordpressParser
. TheRegularParser
is not able to even process the full document as it just continues to spin until the PHP process is terminated.FYI Both Wordpress and Regex parsers are able to parse this document. (note: corruption issues are handled in a separate issue #25 (comment))
The text was updated successfully, but these errors were encountered: