-
Notifications
You must be signed in to change notification settings - Fork 16
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
change the JSON parser to the native one #142
Comments
Looks like it was changed to the handrolled thing in c1f7725 because the native parsing was enforcing a change of types somewhere undesirable. |
@g-roma do you happen to remember what |
I can't remember, but there was some problem. |
The problem seems to be that d = "{\"foo\":[1.0,2.0,3,4,5]}".parseJSON
d["foo"].do{|x| x.class.postln}
🤦 So, I guess the alternative to what we're doing now is to walk the whole |
see supercollider/supercollider#1154 which has been open since 2014 looks like yaml-cpp doesn't provide a nice way to determine whether a scalar is a string, int or float (see https://stackoverflow.com/questions/19994312/obtain-type-of-value-stored-in-yamlnode-for-yaml-cpp) |
Indeed @weefuzzy at the moment I can read faster but I cannot use any of it without converting to float the strings... not super useful :) Slow it stays then, until we find a way around this. |
actually, running
takes 100% cpu for quite some time. So I don't know what the answer to
is yet... |
ok our version is faster than parsing the dict to itself - although it suddenly occured to me that maybe I'm making an infinite loop by parsing over itself - another test is needed. |
as disucssed with @weefuzzy we had a pre 3.6 home-made parser. we could implement it as a fall back with try like in FluidSound, or just remove it and replace by the following code which is much faster for large DS to dump to dict for instance (via the tempfile)
The text was updated successfully, but these errors were encountered: