Skip to main content
Topic: BBC Parsing (Read 38910 times) previous topic - next topic
0 Members and 3 Guests are viewing this topic.

Re: BBC Parsing

Reply #60

It's a page, but it can serve as a really really abused message :P
~ SimplePortal Support Team ~

Re: BBC Parsing

Reply #61

Quote from: Joshua Dickerson – If someone posted a message like that, I'd just wind up deleting their message. Is that a message for the preparser to check? I don't see people posting anything like that all that often so I wouldn't say we need to check for anything like that.
I feel you never looked around that much in other boards. :P
That's not really unusual, it's one of the many possibility people come up with. It can be done with a bit of php? Most likely. But if people have to learn a "whole" programming language just to show a page with some staff or people, they tend to just put things together with bbc.
It's just normal, I would try to avoid make assumptions on what people could and could not write.
Have a look at wcrpg (or whatever is called today) and what kind of messages you can see there, the amount of bbc is completely different e from what you see here, and that's good.
Bugs creator.
Features destroyer.
Template killer.

Re: BBC Parsing

Reply #62

However, it's still a PITA to keep it tidy and find occasional screw-ups ;D But yes sometimes people end up using tons of BBC for many many purposes that we may find "odd" or somewhat uncommon, but it's just "us". They'd be like "huh? I have been using this for ages! Why can't I use it anymore? F@&ck this, I am going to switch to something that allows me to use it the way I always did"
~ SimplePortal Support Team ~

Re: BBC Parsing

Reply #63

Quote from: emanuele –
Quote from: Joshua Dickerson – If someone posted a message like that, I'd just wind up deleting their message. Is that a message for the preparser to check? I don't see people posting anything like that all that often so I wouldn't say we need to check for anything like that.
I feel you never looked around that much in other boards. :P
That's not really unusual, it's one of the many possibility people come up with. It can be done with a bit of php? Most likely. But if people have to learn a "whole" programming language just to show a page with some staff or people, they tend to just put things together with bbc.
It's just normal, I would try to avoid make assumptions on what people could and could not write.
Have a look at wcrpg (or whatever is called today) and what kind of messages you can see there, the amount of bbc is completely different e from what you see here, and that's good.
I try to avoid forums that use excessive formatting. If you need it, you obviously aren't saying anything important enough for me to read.

I can add that and see how it does but I will need to make changes to Nginx and PHP on my test server to allow it to run long enough to benchmark. As it is now, I have to reduce my benchmark to 500 iterations from 1000 because Spuds and I added so many messages.

Re: BBC Parsing

Reply #64

Thats a fun stress test :D Its always good to have something extreme that works with the old parse to see if the new one can handle it (and seems to work fine BTW)

Re: BBC Parsing

Reply #65

It works fine but gets destroyed on time :(

Attached a zip of the profile.

Sorry @Flavio93Zena, this is going to be hard for you to understand and you need a program that can read the file.

Re: BBC Parsing

Reply #66

No worries, I entirely stopped trying to understand on the parser, way too complicated.
~ SimplePortal Support Team ~

Re: BBC Parsing

Reply #67

QuoteIt works fine but gets destroyed on time
Strange, when I ran it it was not much different, at least from the output of of the test parser program.

Re: BBC Parsing

Reply #68

What version of PHP?

Re: BBC Parsing

Reply #69

5.3 on my local
Code: [Select]
Messages: 128
Iterations: 100
Total Time In Tests: 56.17
Total Time (A): 27.68
Total Time (B): 28.5
Diff Total Time: 0.82204399999999
Diff Total Time %: -2.97
The abuse one is
Code: [Select]
pass 	21.574234 	21.923254 	-0.349 	-1.62

Re: BBC Parsing

Reply #70

I guess I must have had the profiler on. I am regularly getting results like this with 1 out of 10 or so showing A to be faster than B.
Code: [Select]
Messages: 128
Iterations: 100
Total Time In Tests: 16.66
Total Time A (Old parse_bbc): 8.79
Total Time B (Parser): 7.87
Diff Total Time: 0.921209
Diff Total Time %: 10.48

Code: [Select]
pass	5.296251	4.543548	0.7527	14.21

So, it looks like 5.6 is way faster than 5.3 but that could just be our machines. What is almost certain is that 5.6 works way better with objects than 5.3. Also, I need to always make sure I have profiling turned off.

Re: BBC Parsing

Reply #71

Code: (message) [Select]
[img alt="My image" height="100" width="100"]http://www.google.com/img.png[/img]
Code: (Old) [Select]
<img src="http://www.google.com/img.png" alt="*quot;My image*quot; height=*quot;100*quot; width=*quot;100*quot;" style="" class="bbc_img resized" />
Code: (New) [Select]
<img src="http://www.google.com/img.png" alt="*quot;My image*quot; height=*quot;100*quot; width=*quot;100*quot;" style="" class="bbc_img resized" />

Replace * with & because of the bug.

[img alt="my image" height="10" width="10"]http://www.elkarte.net/community/themes/default/images/_besocial/logo_elk.png[/img]
There's a bug in the old parser which means there's one in the new. Quoted attributes don't seem to work.

Re: BBC Parsing

Reply #72

Okay, not really a bug in the parser. It's a bug in the BBC array. Doesn't make sense to have alt without quotes. Test 56 still works as expected.


Re: BBC Parsing

Reply #74

For what? In earlier versions I toyed around with SplStack for the opened tags but I decided not to use it.