Giter Site home page Giter Site logo

Comments (2)

technomancy avatar technomancy commented on August 11, 2024

A thread pool is certainly possible, though this is the first I've heard of too many threads being an issue. Are the compilation threads staying around longer than they should?

from swank-clojure.

samaaron avatar samaaron commented on August 11, 2024

No, they're not sticking around longer than necessary and I'm probably barking up the wrong tree with this "issue" anyway. Let me explain and tell me where my reasoning is flawed...

I'm using Clojure to trigger synthesisers and occasionally I see hiccups in the triggering. i.e. they trigger later than expected - like the system paused for a moment, buffered all triggers and executed them in much close succession than requested at a later time than expected.

My first thought was that the GC was kicking in and stopping the world. I've since heavily tuned it and monitored it and am pretty confident it's not the issue.

Now I'm looking at the thread creation count and it's extremely high. It seems that for each synth trigger 4-5 JVM threads are created which feels wasteful (although I may be entirely wrong here). I'm not too concerned about the memory usage of threads, and they're extremely short-lived anyway, rather I'm concerned about the potential cost in terms of "trigger time" - the time between triggering a synth in emacs and the actual synth being triggered in the underlying sound synthesis engine which relies on these new threads (both in swank-clojure and overtone).

I was wondering whether the creation of threads is a potential "stop the system" event. i.e. I assume the responsibility for the creation of threads is handed to the kernel which could be busy doing other things.

I'm struggling to find useful resources to enlighten me as to what's really going on here. Perhaps you have more of an idea than myself?

from swank-clojure.

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.