salsify/jsonstreamingparser

Pledge allegiance to semantic versioning :)

robations opened this issue · 6 comments

Entirely up to the project owner, but it helps when reasoning about dependencies and maintenance if you know that a given dependency adheres to a particular versioning standard. The current tags show v1.0, v2.0, v3.0, v4.0 but I'm not sure if they represent breaking changes or just updates. I'm also keen to use the Name\Spaced\Update on master but not sure if master is really stable...

http://semver.org/

@robations Thanks for bringing this back up. The intent was always to use Semantic Versioning (and indeed the versions you mention are NOT backwards-compatible from what I remember; each breaks some form of the interface). Currently HEAD is also not compatible with v4.0. I'm waiting on resolution to @andig question on Issue #29 so that the project has full PSR-4 compliance before tagging v5.0.

Thanks for your response, and the project.

@robations You're very welcome! If you have any other feedback, please send along.

Cheers. I did have one issue, but didn't investigate far enough to warrant raising a separate issue (which I will do if I have time).

In brief, I created a parser for a particular JSON structure and it was surprisingly slow. Just to iterate through ~3000 records without really doing any work on them took minutes. This was with PHP 5.6, so I switched to HHVM, which is actually the target environment, and this went down to seconds and was pretty speedy.

I'd need to run this through a profiler to really find out what was going on with PHP. I was using SplStack to build up my data structures so I couldn't rule out that as being the issue. Thought I'd mention this, but obviously off-topic here!

Interesting. Well, if you see it again and can reproduce definitely file a bug. 3000 records shouldn't take very long generally.

andig commented

Just to iterate through ~3000 records without really doing any work on them took minutes.

I read somewhere on im0rtality that they've removed whitespace parsing to significantly improve performance on their fork. I wouldn't need the whitespaces- but this should really be discussed as separate issue...