GithubHelp home page GithubHelp logo

Comments (2)

AIGeneratedUsername avatar AIGeneratedUsername commented on May 27, 2024

By the way, (because I do not want to create many issues), is it expected that subsequent skjold calls every time take 3 minutes? Why is it so slow? Without changing files calling the command two times takes 6 minutes, three times - 9 minutes, etc.

Can cache be improved so if skjold is called again without a big pause and without changed files, then it will not take again 3 minutes? For example, if files are the same and less than N minutes from the previous scan, then skip some checks.

Anyway, 3 minutes on every call is very slow. I will need to inspect the source code to see what is happening here...

from skjold.

twu avatar twu commented on May 27, 2024

👋 Thanks for taking the time to raise those issues and sorry for the late reply! :)

RE "Warning: No advisory sources configured!": Great point! The logic could definitely use a refactor to not print a warning when specifying sources via the CLI. I'm happy to review/merge a PR if you want to tackle it?

RE "Caching": Without more information it is hard to tell whether things should be faster or not. Using all sources at once might also a little bit of overkill as there is probably a lot of overlap between them. Either way skjold was definitely not optimized for speed e.g. the gemnasium source reads and parses all YAML files from an archive (https://github.com/twu/skjold/blob/master/src/skjold/sources/gemnasium.py#L115) on every invocation etc. It has a very basic (and hopefully working 😅) caching mechanism built in though (See https://github.com/twu/skjold/blob/master/src/skjold/core.py#L128-L136 and https://github.com/twu/skjold/blob/master/src/skjold/core.py#L93-L97).

I'm currently a little busy with work/private life but I will try to give it a deeper look this weekend along with any bugs or issues you find along the way. I'm also happy to review/merge any PRs tackling bugs if you are up for it? :)

P.S.: I also have mentioning this in the README.md on my TODO list as well but just so you are aware: skjold was created in a time way before PyPA released pip-audit which has way smarter and more dedicated people working on it (e.g. Dustin Ingram,...). I'm assuming they optimized for speed already with the amount of people using it. It might also be a far superior option depending on your use case :)

from skjold.

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.