QLC freezes when pasting large amount of text

Ask a generic question about the usage of QLC+, not related to a particular operating system
Post Reply
brad992
Posts: 9
Joined: Mon Aug 22, 2022 3:21 pm
Real Name: Bradley

I'm using scripts. When I paste large amounts of text into the script editor it freezes, sometimes for up to 20 minutes. It is an awfully long time to wait. I am attempting to paste between 50k-150k lines at a time. Pasting below 50k and the wait time is bearable. But I want to paste more than 50k at a time.

Does anyone have any solutions? Does anyone else have this issue?
User avatar
mcallegari
Posts: 4711
Joined: Sun Apr 12, 2015 9:09 am
Location: Italy
Real Name: Massimo Callegari
Contact:

What is the usage case that leads you to use 50k-150k of scripts?!?!
Perhaps you need to split them into "phases" and call them sequentially in a Chaser.
Or perhaps you misunderstood how QLC+ should be used and should review your workflow.
User avatar
sbenejam
Posts: 607
Joined: Sun Apr 12, 2015 6:28 pm
Real Name: Santiago Benejam Torres
Contact:

Which operating system do you use?.
Have you tried to past 50k-150k lines of code in other program?.
Why do you need one hundred and fifty thousand lines of code to program a lighting show in QLC+?.
Can you post an example of the lines of code you're trying to past?.
I'm curious to know why QLC+ has this strange behavior.

;-)
brad992
Posts: 9
Joined: Mon Aug 22, 2022 3:21 pm
Real Name: Bradley

mcallegari wrote: Fri Nov 04, 2022 3:36 pm What is the usage case that leads you to use 50k-150k of scripts?!?!
Perhaps you need to split them into "phases" and call them sequentially in a Chaser.
Or perhaps you misunderstood how QLC+ should be used and should review your workflow.
Thank you for your reply. Let me elaborate on my project. I am trying to program complex patterns for my 2 lasers. I also want to synchronise this to songs. I could not find any suitable ways of doing this in real-time so instead I have turned to the script editor. I can generate the DMX values outside of QLC and I can handle all of the timing information too. So I am just pasting this into the script editor. Next I simply create a collection which contains my script and song.mp3 and then it's ready to go. However the slowest part in this process is waiting for QLC to unfreeze. Not only does QLC freeze when the code is pasted, it freezes when opening the script too. A lot of time is spent waiting for QLC to unfreeze.

There are many features on QLC which have made my project possible and has helped me immensely for this. QLC has everything I need, this is just my biggest issue I have come across so far. I am aware this is a niche issue, but I am hopeful there are others which have found a solution to this problem.
brad992
Posts: 9
Joined: Mon Aug 22, 2022 3:21 pm
Real Name: Bradley

sbenejam wrote: Sat Nov 05, 2022 12:56 pm Which operating system do you use?.
Have you tried to past 50k-150k lines of code in other program?.
Why do you need one hundred and fifty thousand lines of code to program a lighting show in QLC+?.
Can you post an example of the lines of code you're trying to past?.
I'm curious to know why QLC+ has this strange behavior.

;-)
I am using Windows 10. QLC 4.12.5

Yes I have tried to paste up to 150k lines of code into notepad. Notepad handles it quite well, does not freeze with this amount.

I need to use this many lines of code in my project because it is a lightshow using 2 lasers which I want to program very complex patterns with them. I also want to synchronise this to songs. Take for example a 7 minute song, which is running a show at 20 FPS, that is 8,400 frames, therefore if I update all channels for each frame that is 168,000 lines of code. However I don't have to update all channels for each frame so this song would reduce down to about 30-60k lines of code.

I have attached an example text file of the code for a 7 minute song. It is about 50k lines of code.

I am curious too, I would have assumed it would handle it easily. Unfortunately I do not understand the technical side of this stuff.
Attachments
QLC code example.txt
An example of what 50k lines of code looks like for my laser show.
(1.9 MiB) Downloaded 61 times
User avatar
mcallegari
Posts: 4711
Joined: Sun Apr 12, 2015 9:09 am
Location: Italy
Real Name: Massimo Callegari
Contact:

I tried to paste the text you attached into QLC+ 5 script editor. It took about 3 seconds.
Not sure if you can already use v5, but maybe by adapting the syntax a bit you can manage to get something working

[EDIT] ...and I found this comment in the v4 Script editor code... :sweat_smile:
https://github.com/mcallegari/qlcplus/b ... r.cpp#L208
janosvitok
Posts: 1325
Joined: Mon Apr 13, 2015 7:05 am
Location: Bratislava, Slovakia
Real Name: Jano Svitok
Contact:

Does it help if you set m_script->setUpdatesEnabled(false) before loading and (true) after?

Jano
brad992
Posts: 9
Joined: Mon Aug 22, 2022 3:21 pm
Real Name: Bradley

mcallegari wrote: Sun Nov 06, 2022 5:48 pm I tried to paste the text you attached into QLC+ 5 script editor. It took about 3 seconds.
Not sure if you can already use v5, but maybe by adapting the syntax a bit you can manage to get something working

[EDIT] ...and I found this comment in the v4 Script editor code... :sweat_smile:
https://github.com/mcallegari/qlcplus/b ... r.cpp#L208
Ok so I downloaded QLC+ 5 and it took my computer 35 seconds. Comparing this with QLC+ 4 this took 14 minutes. So that is a huge improvement for me. Thank you. I think I will use QLC+ 5 from now on.
brad992
Posts: 9
Joined: Mon Aug 22, 2022 3:21 pm
Real Name: Bradley

janosvitok wrote: Sun Nov 06, 2022 8:04 pm Does it help if you set m_script->setUpdatesEnabled(false) before loading and (true) after?

Jano
I would not know how to go about doing this so I am unable to test this sorry.
janosvitok
Posts: 1325
Joined: Mon Apr 13, 2015 7:05 am
Location: Bratislava, Slovakia
Real Name: Jano Svitok
Contact:

The comment was meant for Massimo. I should have stated that. Sorry for confusion.

Jano
User avatar
mcallegari
Posts: 4711
Joined: Sun Apr 12, 2015 9:09 am
Location: Italy
Real Name: Massimo Callegari
Contact:

janosvitok wrote: Sun Nov 06, 2022 8:04 pm Does it help if you set m_script->setUpdatesEnabled(false) before loading and (true) after?
I haven't tried that yet
janosvitok
Posts: 1325
Joined: Mon Apr 13, 2015 7:05 am
Location: Bratislava, Slovakia
Real Name: Jano Svitok
Contact:

Nevertheless, 50K looks like insane amount of text... I hope there is a simpler way of doing it.

50K is about the size of QLC+ code itself :D see https://coveralls.io/github/mcallegari/qlcplus
Post Reply