Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Better responsiveness when loading remote plugins #607

Open
armislv opened this issue Apr 13, 2014 · 12 comments
Open

Better responsiveness when loading remote plugins #607

armislv opened this issue Apr 13, 2014 · 12 comments
Labels
Milestone

Comments

@armislv
Copy link

armislv commented Apr 13, 2014

Edited by @tresf April 13th, 2015, adjusted original post to reflect actual problem.

Lukas-W wrote Apr 15, 2014: "While it is normal that loading a VST takes a few seconds, it should not cause LMMS to freeze. Instead, the loading process should take place in a separate thread so that the UI stays responsive. I don't know the architecture well enough, so I can't say if this is possible."


LMMS often hangs when loading vst dll. The system is linux. It becomes very unresponsive when it happens. Seems it is looping in while (1) at the end of RemoteVstPlugin::RemoteVstPlugin. I am not an expert of programming threads, but maybe some QThread::msleep can help here?

@diizy
Copy link
Contributor

diizy commented Apr 14, 2014

I don't know... can someone test this and see what happens?

@musikBear
Copy link

dont have linux, but armislv, you write " when loading vst dll." -Is that then meant generally, eg ALL vsts, ot ONE specific vst? -What is the behavior with the vst Synth1. Synth1 is kind of a MustWork, and at the same time very cpu friendly. That is in NO way a general rule for vsts
How does Synth1 do for you?

@armislv
Copy link
Author

armislv commented Apr 14, 2014

Exactly the synth1 it is. But this happens with other vsts as well.

@Sti2nd
Copy link
Contributor

Sti2nd commented Apr 14, 2014

but hangs... of course it hangs when your CPU is running high... it does with everyone, but hangs... I wouldn't call it hang, I'll call it working.

@musikBear
Copy link

Oo 'hangs' is that the 'please wait' for 2-4 skd? As Sti2nd says- thats normal. A lot of data shifts and all always has a little 'break' at that time. Hangs is when you have time for a coffebreak. Serious hangs is when you have time to buy the coffee :p
No sorry seriously, its a pc issue, not a lmms. But you dont describe hw, so any bottleneck is not idenfiable. ..How -long- do you wait?

@armislv
Copy link
Author

armislv commented Apr 15, 2014

This happens on 3 different pcs. The most powerful one have E8400 3 GHz dual core CPU. On this pc this happens less often, of course. Sometimes dll get loaded, but sometimes not, especially when loading some project. I tried to wait ~ hour couple of times, then killed lmms.

@lukas-w
Copy link
Member

lukas-w commented Apr 15, 2014

While it is normal that loading a VST takes a few seconds, it should not cause LMMS to freeze.
Instead, the loading process should take place in a separate thread so that the UI stays responsive. I don't know the architecture well enough, so I can't say if this is possible.

@armislv
Copy link
Author

armislv commented Apr 16, 2014

Probably the while loop takes too much of cpu.

@musikBear
Copy link

~hour is of cause rediculous, and not ok - and thats with Synth1? Could it be that you installed it wrongly, or that some component is flawed (could be a kit??) -then lmms helplessly would loop while trying to find the piece. If it was a general problem, other would have reported it , i think - Synth1 loads for me (win32) < 2 sekd. -Need other linux users input here

@Sti2nd
Copy link
Contributor

Sti2nd commented Apr 17, 2014

Obviously this is a bug, I was wrong. It should maximum hang for some seconds with synth1. Now: "system is linux" isn't enough information. And LMMS probably does it wrong as far as I have experienced @lukas-w cause LMMS' GUI often become unresponsive when it is working.

@tresf
Copy link
Member

tresf commented Apr 6, 2015

@armislv if you find a place where the code could improve, please test it out and send over a pull request.

@tresf tresf changed the title lmms hangs while loading vst More responsiveness when loading remote plugins Apr 6, 2015
@tresf tresf changed the title More responsiveness when loading remote plugins Better responsiveness when loading remote plugins Apr 6, 2015
@tresf tresf added the bug label Apr 6, 2015
@tresf tresf added this to the 1.3.0 milestone Apr 6, 2015
@tresf
Copy link
Member

tresf commented Aug 24, 2015

I'm pretty sure this is due to a while loop in RemoteVstPlugin.cpp#L405

We should instead use a method which scheduled a periodic check of the plugin as this while loop will use every CPU cycle until the plugin is loaded, potentially blocking other operations.

Edit zonkmachine: fixed broken link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

7 participants