Skip to content

Performance improvement on tabs replacement#39

Merged
brendo merged 1 commit intosymphonycms:integrationfrom
DeuxHuitHuit:tab-perf
May 9, 2014
Merged

Performance improvement on tabs replacement#39
brendo merged 1 commit intosymphonycms:integrationfrom
DeuxHuitHuit:tab-perf

Conversation

@nitriques
Copy link
Member

It processes the regex line by line instead of for the hole output, which drastically reduce the memory consumption.

I had a page with an 8000 line xml that refuses to render under 30 seconds. With this fix, it now renders properly in 7 secs.

Using strstr in a while loop is evil too. Using strpos is way better (as stated in the php docs).

@brendo
Copy link
Member

brendo commented May 7, 2014

Initial look is promising, will test on some XML this evening

brendo added a commit that referenced this pull request May 9, 2014
Performance improvement on tabs replacement
@brendo brendo merged commit f292516 into symphonycms:integration May 9, 2014
@brendo
Copy link
Member

brendo commented May 9, 2014

Local tests went well, definitely feels snappier. @michael-e will probably appreciate this the most as he always deals with massive amounts of XML! Thanks @nitriques!

@nitriques
Copy link
Member Author

You're welcome!

@michael-e
Copy link
Member

@michael-e will probably appreciate this the most as he always deals with massive amounts of XML!

Unless I break it. :-)

No, honestly, sounds good! I had to get used to ?debug=raw a while ago...

@nitriques
Copy link
Member Author

Great! If you spot a bug, please let me know!

@nitriques nitriques mentioned this pull request Aug 4, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants