Speed up MusE startup

MusE is a DAW for Linux with both MIDI and Audio editing. https://muse-sequencer.github.io

Moderators: MattKingUSA, khz, spamatica

Post Reply
Basslint
Established Member
Posts: 1511
Joined: Sun Jan 27, 2019 2:25 pm
Location: Italy
Has thanked: 382 times
Been thanked: 298 times

Speed up MusE startup

Post by Basslint »

Hello,

I have a fairly powerful computer but MusE takes a while to start up (~5 seconds) and to close down (~1 second). A bulkier program, Blender, takes ~3 seconds to startup.

This happens not only when MusE starts JACK but also when a JACK server is already started (maybe it's a bit faster, but not noticeably).

Is there something I can do to speed up MusE's startup? Keep in mind that I only use MusE as a MIDI editor so I don't need any of the audio editing functionalities.
The community of believers was of one heart and mind, and no one claimed that any of his possessions was his own, but they had everything in common. [Acts 4:32]

Please donate time (even bug reports) or money to libre software 🎁

Jam on openSUSE + GeekosDAW!
Tim E. Real
Established Member
Posts: 660
Joined: Sat Sep 15, 2012 12:36 am
Has thanked: 36 times
Been thanked: 105 times

Re: Speed up MusE startup

Post by Tim E. Real »

Hello. There are command-line switches available to disable loading
of various plugin support, which can help improve loading time. Type muse3 -h to see the options.

Also if you are using the latest git version of MusE, there is now a plugin scanner which does add
considerable loading time - but only once. After the one-time scan it should be back to 'normal' speed.
Basslint
Established Member
Posts: 1511
Joined: Sun Jan 27, 2019 2:25 pm
Location: Italy
Has thanked: 382 times
Been thanked: 298 times

Re: Speed up MusE startup

Post by Basslint »

Tim E. Real wrote:Hello. There are command-line switches available to disable loading
of various plugin support, which can help improve loading time. Type muse3 -h to see the options.

Also if you are using the latest git version of MusE, there is now a plugin scanner which does add
considerable loading time - but only once. After the one-time scan it should be back to 'normal' speed.
Hello, I disabled all plugins and it did improve loading time. Now it's around 3 seconds when JACK is already open, and closing time is negligible, thank you. Is there something else I can do?
The community of believers was of one heart and mind, and no one claimed that any of his possessions was his own, but they had everything in common. [Acts 4:32]

Please donate time (even bug reports) or money to libre software 🎁

Jam on openSUSE + GeekosDAW!
Tim E. Real
Established Member
Posts: 660
Joined: Sat Sep 15, 2012 12:36 am
Has thanked: 36 times
Been thanked: 105 times

Re: Speed up MusE startup

Post by Tim E. Real »

Mm, not much else I can think of.
If you are building MusE from source you can ensure that the build type
is 'Release' rather than 'Debug' which could help with speed.
Tim E. Real
Established Member
Posts: 660
Joined: Sat Sep 15, 2012 12:36 am
Has thanked: 36 times
Been thanked: 105 times

Re: Speed up MusE startup

Post by Tim E. Real »

OK If you are actually counting seconds, then there is this in main.cpp at line 1086:

Code: Select all

        // WARNING Must do it this way. Call registerClient long AFTER Jack client is created and MusE ALSA client is
        // created (in initMidiDevices), otherwise random crashes can occur within Jack <= 1.9.8. Fixed in Jack 1.9.9.  Tim.
        // This initMidiDevices will automatically initialize the midiSeq sequencer thread, but not start it - that's a bit later on.
        MusECore::initMidiDevices();
        // Wait until things have settled. One second seems OK so far.
        for(int t = 0; t < 100; ++t)
          usleep(10000);
        // Now it is safe to call registerClient.
        MusEGlobal::audioDevice->registerClient();
You uh, could remove the 'for' and 'sleep' lines, if you heed the above warning :wink:

[Edit:] Done in git master now!
No more one-second wait :)
The hack is about six years old now, was for Jack <= 1.9.8. Jack 1.9.9.5 was released Dec 10 2012.
Commented out for now. To be removed at some point if we're all good.
Try it out.
Post Reply