Giter VIP home page Giter VIP logo

Comments (5)

halostatue avatar halostatue commented on August 20, 2024

This would be fairly useful, but there is not much of a definable benefit to this as a default. I will do further investigation on this, but I think that I am more likely to look at removing the lazy load functionality entirely for mime-types 4.x because of the columnar capabilities added in 2.6 and improved in 3.0.

from ruby-mime-types.

grosser avatar grosser commented on August 20, 2024

came here because I noticed 0.3s of my boot time going into mime-types :(

used this flag and ran 1 test each ... only showing 0.1s gain, but that might be because the files are hot/cached at this point, so not sure about the real gain but it is a step in the right direction ..

RUBY_MIME_TYPES_LAZY_LOAD=true
runs: 10
total: 53.86
average: 5.39
range: 5.27..5.82

without:
runs: 10
total: 54.48
average: 5.45
range: 5.35..5.54

from ruby-mime-types.

halostatue avatar halostatue commented on August 20, 2024

You should also look at using require: 'mime/types/columnar' in your Gemfile since you appear to be stuck on 2.99.x, which will do a different form of lazy loading (columnar, so you get fast lookups for minimal data). The other advantage on this is that it will drop the memory of use MIME::Types by about 1/3. I am trying to get rest-client to loosen the MIME::Types version they require so that MIME::Types 3 can be used (it allows for independent updating of the data file), and the zendesk_api should probably do the same.

from ruby-mime-types.

grosser avatar grosser commented on August 20, 2024

that would be awesome :)

On Thu, May 12, 2016 at 10:19 PM, Austin Ziegler [email protected]
wrote:

You should also look at using require: 'mime/types/columnar' in your
Gemfile since you appear to be stuck on 2.99.x, which will do a
different form of lazy loading (columnar, so you get fast lookups for
minimal data). The other advantage on this is that it will drop the memory
of use MIME::Types by about 1/3. I am trying to get rest-client to loosen
the MIME::Types version they require so that MIME::Types 3 can be used (it
allows for independent updating of the data file), and the zendesk_api
should probably do the same.


You are receiving this because you commented.
Reply to this email directly or view it on GitHub
#62 (comment)

from ruby-mime-types.

halostatue avatar halostatue commented on August 20, 2024

As previously discussed: this is being deprecated. Some testing suggests that it has no effective impact compared to the columnar loading that is the default version in v3.

from ruby-mime-types.

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.