Giter VIP home page Giter VIP logo

Comments (4)

FabriceSalvaire avatar FabriceSalvaire commented on May 28, 2024

Maybe registry.py:load_plugins() should be optional and perform lazily

from isbnlib.

xlcnd avatar xlcnd commented on May 28, 2024

Thanks!

This is a known problem... however my tests gave < 200 ms even in old machines! What python version are you using? And CPU?

from isbnlib.

xlcnd avatar xlcnd commented on May 28, 2024

Could you make a test with the branch lazy-import?

from isbnlib.

xlcnd avatar xlcnd commented on May 28, 2024

With the new branch I get:

         61369 function calls (59978 primitive calls) in 0.082 seconds

   Ordered by: cumulative time

   ncalls  tottime  percall  cumtime  percall filename:lineno(function)
    105/1    0.003    0.000    0.082    0.082 {built-in method builtins.exec}
        1    0.000    0.000    0.082    0.082 isbnlib_import.py:1(<module>)
    118/1    0.001    0.000    0.082    0.082 <frozen importlib._bootstrap>:966(_find_and_load)
    118/1    0.000    0.000    0.082    0.082 <frozen importlib._bootstrap>:936(_find_and_load_unlocked)
    117/1    0.001    0.000    0.082    0.082 <frozen importlib._bootstrap>:651(_load_unlocked)
     96/1    0.000    0.000    0.082    0.082 <frozen importlib._bootstrap_external>:672(exec_module)
    152/1    0.000    0.000    0.082    0.082 <frozen importlib._bootstrap>:211(_call_with_frames_removed)
        1    0.000    0.000    0.082    0.082 __init__.py:4(<module>)
        1    0.000    0.000    0.068    0.068 _ext.py:2(<module>)
     14/4    0.000    0.000    0.062    0.016 {built-in method builtins.__import__}
        1    0.000    0.000    0.061    0.061 _cover.py:2(<module>)
        1    0.000    0.000    0.060    0.060 __init__.py:2(<module>)
   243/88    0.000    0.000    0.058    0.001 <frozen importlib._bootstrap>:997(_handle_fromlist)
        1    0.000    0.000    0.038    0.038 webquery.py:2(<module>)
        1    0.000    0.000    0.034    0.034 webservice.py:2(<module>)
        1    0.000    0.000    0.030    0.030 request.py:68(<module>)
        1    0.000    0.000    0.024    0.024 client.py:69(<module>)
        1    0.000    0.000    0.021    0.021 helpers.py:4(<module>)
        1    0.000    0.000    0.019    0.019 _fmt.py:4(<module>)
        1    0.000    0.000    0.018    0.018 uuid.py:45(<module>)

from isbnlib.

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.