Code Monkey home page Code Monkey logo

Comments (3)

dblock avatar dblock commented on September 27, 2024

This makes sense. You should open an issue in bson-ruby against that commit as well, because it's clearly a performance regression.

Then, is there a way to write a test for this in mongoid-slug (eg. examining the query results and making sure it hit an index or the number of documents scanned was 1 when there're 2 records in the DB for example), and then way to modify the query and remove that option in mongoid-slug?

from mongoid-slug.

mzikherman avatar mzikherman commented on September 27, 2024

This makes sense. You should open an issue in bson-ruby against that commit as well, because it's clearly a performance regression.

Will do, wasn't sure if I should but I'll file something there and see if anyone has something to add.

Then, is there a way to write a test for this in mongoid-slug (eg. examining the query results and making sure it hit an index or the number of documents scanned was 1 when there're 2 records in the DB for example), and then way to modify the query and remove that option in mongoid-slug?

I will investigate this, thanks!

from mongoid-slug.

mzikherman avatar mzikherman commented on September 27, 2024

As an FYI, I have a branch where I've switched to use Regexp::Raw over Ruby's Regexp to get around the multiline option performance hit.

The former is a class provided by BSON in order to get around this. see mongodb/bson-ruby#71 for that discussion.

I've just commented there mongodb/bson-ruby#71 (comment) . My branch still has 2 failing specs around embedded documents, and I was unsuccessful in debugging that (besides thinking that there might be a further Mongoid issue).

When I get that answered, I should be able to come back here and finish this.

from mongoid-slug.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.