Giter Site home page Giter Site logo

Comments (5)

findepi avatar findepi commented on July 20, 2024

I proposed some allegedly smarted approach in a PR #69.

from findbugs.

iloveeclipse avatar iloveeclipse commented on July 20, 2024

Another approach would be to use a fixed thread pool and set the thread priority for the FB threads:

  • Introduce new preferences "maxWorkerThreads" and "jobPriotity" for the FB plugin
  • Defaults are Runtime.getRuntime().availableProcessors() and Thread.NORM_PRIORITY
  • Let the job code "as is" and do the actual work NOT on the Eclipse job worker thread (we cannot manipulate them because they are reused for other jobs too), but schedule FB jobs on the threads taken from the FB own, limited thread pool (by "maxWorkerThreads").
  • The Eclipse FB jobs would be only responsible to show user the progress and allow cancellation
  • The real FB worker threads will run with the priority set to "jobPriotity" preference.

I haven't tried this, but this approach should allow everyone to "tune" FB execution in either way (faster but busy loading JVM or slow but nice).

from findbugs.

findepi avatar findepi commented on July 20, 2024

If threads are competing for RAM, I don't think priority helps much. But the ability to manually control "maxWorkerThreads" would indeed help. (E.g. I would set to 3 on my 8-core desktop, as this perceivedly yields results fastest).

I don't know Eclipse internals, so pardon question -- is running FB as a subprocess completely infeasible?

from findbugs.

iloveeclipse avatar iloveeclipse commented on July 20, 2024

Sure, all threads running in the VM memory and so competing with each other per definition.
A "subprocess" is not feasible in plain Java (without JNI) - we have either (VM external) processes or (VM internal) threads.

from findbugs.

iloveeclipse avatar iloveeclipse commented on July 20, 2024

This project continues development in a new home: https://github.com/spotbugs/spotbugs/

Please do not open new issues here anymore!

from findbugs.

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.