Skip to content

Move the Ruby driver to a fast protobuf library #1025

Closed

Description

@coffeemug

To improve serialization speed

Activity

  1. ghost assigned on Jun 18, 2013
  2. AtnNn commented on Jun 18, 2013

    @AtnNn
    Member

    Isn't this #783?

  3. coffeemug commented on Jun 18, 2013

    @coffeemug
    ContributorAuthor

    Yes it is. Closing #783 (because this issue has a consistent name with py and js versions of it).

    Also, as @mlucy mentioned in #783, https://github.com/codekitchen/ruby-protocol-buffers looks promising.

  4. mlucy commented on Jun 19, 2013

    @mlucy
    Member

    This is in review 648 by @AtnNn . It still needs some packaging love. Moving protobuf libraries was surprisingly easy, but removing that bottleneck exposed another large performance problem.

    I'm currently seeing around a 10x performance improvement sequentially inserting 100 10kb unbatched documents (from 23 seconds to 2.7).

  5. mlucy commented on Jun 19, 2013

    @mlucy
    Member

    Also, for the record, we're still 10x-100x slower than JSON serialization of the same object.

  6. mlucy commented on Jun 19, 2013

    @mlucy
    Member

    Also, astonishingly, when I test it the JSON encoding of objects tends to be smaller than the protobuf encoding (not by that much, though).

  7. coffeemug commented on Jun 19, 2013

    @coffeemug
    ContributorAuthor

    What was the other large performance problem? Also, is it fixed or remains to be fixed (so we can get a sense of where we can take the 10x number)?

  8. mlucy commented on Jun 19, 2013

    @mlucy
    Member

    When someone constructed an object, we'd call caller on every sub-term, when we only needed to call it at the toplevel and pass it down. It turns out that doing so is really expensive. That problem is fixed in the code review.

  9. mlucy commented on Jun 19, 2013

    @mlucy
    Member

    Er, actually, I ran the test incorrectly; it's actually only a 5x improvement.

  10. mlucy commented on Jun 25, 2013

    @mlucy
    Member

    This is in next.

  11. coffeemug commented on Jun 25, 2013

    @coffeemug
    ContributorAuthor

    Has the relevant packaging work been coordinated with @AtnNn? (sorry if I'm asking the obvious, I may be paranoid)

  12. AtnNn commented on Jun 25, 2013

    @AtnNn
    Member

    The dependencies listed in the gemfile have changed.

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

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions