@Dimmy,
Quote from: Dimmy at Jun 21, 2006, 02:23 AM
so what if I made a snippet called The mary had a little lamb nursery rhyme... ? or are spaces not alowd in a snippet name? wil they be replaced by a - ?
Currently you can have spaces inside snippet names. If you have a snippet called "The mary had a little lamb nursery rhyme... " then the parser would execute it. The problem starts when it does not find it. What should the parser do? Should it remove the [[The mary had a little lamb nursery rhyme...]] and treat it like a missing snippet or should it ignore it?
Things will get a bit more complex if you have something like this inside your document:
[[Lesson 1
Some text here some text here...
Some text here some text here...
Some text here some text here...
Some text here some text here...
End of Lesson 1 ]]
I’m thinking maybe we do need to apply rules to resource names. Maybe we should only allow characters such as a-zA-Z, 0-9,-,_,.
What do you think?
@David,
Quote from: davidm at Jun 21, 2006, 05:28 AM
One way to settle this would be to have something displayed if debug mode is "on" (some snippet have a debug parameter, like Ditto).
Yes there are debugging options inside the parser but they are turned off by default. So no perfomance lost if it’s not enabled.
Let’s say I am improperly using a snippet (say, forget to close a backtick or whatever), if the parser just ignores it as an invalid call, it would help to know that something if wrong, rather than have it output an empty string... wouldn’t it ?
Yes I would agree with you but if the parser assumes that it’s a valid snippet but it does not exist then it should return an empty string.
@Adam,
Quote from: aNoble at Jun 21, 2006, 09:19 AM
Out of curiosity, what is our performance like compared to the old version?
On my old PC (800Mhz Duron) I got the following results:
MODx Default Installation Home Page
--------------------------------------
Old Parser: 0.30 to 0.33 seconds
New Parser: 0.30 to 0.34 seconds (with automatic conversion)
In my estimation both operates at pretty much the same speed for simple pages. It’s still in the early stage and needs a lot more testing and performance tuning.
I haven’t looked at the actual code yet but if it would save a decent amount of processing time it might be worth having a backwards compatibility mode that is turned on by default but could be turned off to speed things up.
Yes, we can make it optional.
@Ryan,
Quote from: rthrash at Jun 21, 2006, 09:33 AM
Debug mode to me implies a lot of extra code that echos back what is going on. Stop on notice is cool too. 
I agree but we still need a little code to tell us what’s going on inside the system when something goes wrong