Skip to content
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

PERFORMANCE: JSON vs Oj #14

Open
lgs opened this issue Oct 21, 2014 · 4 comments
Open

PERFORMANCE: JSON vs Oj #14

lgs opened this issue Oct 21, 2014 · 4 comments

Comments

@lgs
Copy link

lgs commented Oct 21, 2014

I notice that BB make extensive use of JSON standard lib. Shouldn't be better to wire in Oj instead ?

./lib/google_bigquery/jobs.rb

      job_id = JSON.parse(res.body)["jobReference"]["jobId"]
        status = JSON.parse(self.get(project_id, job_id).body)
      job_id = JSON.parse(res.body)["jobReference"]["jobId"]
        status = JSON.parse(self.get(project_id, job_id).body)

./lib/google_bigquery/client.rb

      JSON.parse(res.body)
      JSON.parse(res.body)
      body = JSON.parse(@results.body)
      body = JSON.parse(res.body)

./lib/active_record/connection_adapters/bigquery_adapter.rb

          json = JSON.parse(file.read)
@lgs
Copy link
Author

lgs commented Oct 21, 2014

... have a look at some gists

@michelson
Copy link
Owner

@lgs , interesting, it's almost twice fast!
it could be a good alternative

@otobrglez
Copy link

Has there been any work done on Oj implementation by anyone?

@michelson
Copy link
Owner

Hello @otobrglez , there has been no progress on this.
It seems to be a really good alternative, but right now I don't have the time to work on this.
If you are interested maybe you could implement Oj in BigBroda ? , I will be happy to merge any progress on this.

Best regards

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants