xLightsSequencer / xLights

xLights is a sequencer for Lights. xLights has usb and E1.31 drivers. You can create sequences in this object oriented program. You can create playlists, schedule them, test your hardware, convert between different sequencers.
GNU General Public License v3.0
529 stars 196 forks source link

Long RefreshModelList when adding nee model show 1.3+M channels #4560

Closed cybercop23 closed 1 month ago

cybercop23 commented 2 months ago

Using a Mac, latest version || TestFlight, adding any model, CC in this case, takes about 25+ secs for it to show up. Using the same rgbeffects file on on Windows/latest ver... it almost instant.

From the logs... we see refreshModelList took almost 30 seconds 2024-05-13 08:43:54,137 7919443008 log_base [DEBUG] Model 'Candy Canes-2' chained to ''. 2024-05-13 08:43:54,427 7919443008 log_base [DEBUG] RecalcStartChannels takes 279ms. 2024-05-13 08:44:24,065 7919443008 log_base [DEBUG] LayoutPanel::refreshModelList took 29638ms 2024-05-13 08:44:24,795 6146011136 log_base [DEBUG] Custom model GE Priem Cube LG 2 took 6ms to initialise. 2024-05-13 08:44:24,797 7919443008 log_base [DEBUG] Models loaded in 23ms 2024-05-13 08:44:25,606 7919443008 log_base [DEBUG] RecalcStartChannels takes 253ms.

xlights_rgbeffects.txt

blun23 commented 2 months ago

Do you also notice that when changing group names, making changes to number of strings or string start numbers, adding or removing props from groups, etc? I have major slowdowns in pretty much anything I do with my layout.

cybercop23 commented 2 months ago

@dkulp any ideas here? I still can't debug under Mac so can't look at it, but it is extremely interesting that it works fine in Windows.

cybercop23 commented 1 month ago

From Brad's layout... 2024-05-31 15:28:49,864 8603012096 log_base [DEBUG] RecalcStartChannels takes 3572ms. 2024-05-31 15:45:39,563 8603012096 log_base [DEBUG] LayoutPanel::refreshModelList took 1009698ms 2024-05-31 15:45:39,990 8603012096 log_base [DEBUG] Autosaving backup of sequence. 1 million ms

cybercop23 commented 1 month ago

So while the original issue seems to be working on the TestFlight version vs 2024.10 that had the problem, there is still this other similar issue (Brad's issue). If we remove all groups or all submodels the load times drasticly decrease and the Mac is back in line with Windows. Even then, there's way too much time spend that theoretically shouldn't... not that much logging and I can't debug on the Mac, but I'm thinking it may be just i/o and parsing the 20K+ lines in the RGBEffects file...

image

dkulp commented 1 month ago

All these benchmarks and such and there still isn't a packaged sequence attached to this that demonstrates the issue....

blun23 commented 1 month ago

All these benchmarks and such and there still isn't a packaged sequence attached to this that demonstrates the issue....

Dan, this is a layout issue. I have no issues with render times. Would a packaged sequence somehow give you more info? Most of my sequences are a couple gigs so not sure how I could share that. Edit: I guess the package sequences are considerably smaller than fseq

dkulp commented 1 month ago

A packaged "empty/new sequence" is likely fine for this if it's just a layout thing. A single xlights_rgbeffects.xml is NOT enough to reproduce this.

blun23 commented 1 month ago

No prob, Alex has it. Hopefully this ends up helping a lot of people.

derwin12 commented 1 month ago

I wonder if this code in LayoutPanel is killing us for these larger layouts.

bool expand = (std::find(expanded.begin(), expanded.end(), model->GetName()) != expanded.end());

re: https://stackoverflow.com/questions/52065994/why-is-stdfind-s-begin-s-end-val-1000x-slower-than-s-findval-for-a#:~:text=The%20first%20reason%20is%20that,slow%20as%20std%3A%3Afind%20.

(alas our data is not sorted so we may be stuck here)

Update: Nope .. not the issue .. the list is usually empty.

whirlywhopter commented 1 month ago

Hi All, Any updates on this issue? I think I am running into something similar now as well (xLights ver 2024.10, 64GB M1 Max MacBook Pro , Sonoma 14.5)). If try to use the "Import" option in the layout tab, as soon as I click in the layout preview to place the imported model, xLights pauses for several minutes before presenting a window to select an xlights model file. It seems to occur regardless of if a sequence is open at the time and I am not seeing any other types of performance issues such as render times, even on complex sequences. Please let me know if there is anything I can provide to help with troubleshooting on this.

cybercop23 commented 1 month ago

This relates to shows that have a very high channel count. What's your channel count? Better yet, open xlights, and Tools -> Package Log Files and put the resulting ZIP file here.

whirlywhopter commented 1 month ago

I believe my channel count is around 540K. When testing yesterday, the delay seemed to be nearly identical over multiple tests (about 2m:55s - 3m from the time I click in the layout window to place the imported model and when xLights responds with the file selection dialog to finish the model import process). Once this dialog comes up, the rest of the process seems to perform as expected. I can try to export the log files later this evening after another test. Is there an address I can use to send the exported logs instead of posting them?

cybercop23 commented 1 month ago

Use Tools -> Paackge Logs and upload it here.

DonMc33 commented 1 month ago

Models now appear within a second or two now with the 2024.11 release, show contains 1.3m channels.

whirlywhopter commented 1 month ago

When I finally got a chance to run a clean test and capture some logs, I noticed this in the new release too. I can also confirm that the .11 release seems to be loading models within a few seconds here as well.

blun23 commented 1 month ago

I'm running some test on 11.1 right now

blun23 commented 1 month ago

I'm running some test on 11.1 right now

It's still a no for me Dawg.....no change in speeds on my end.

cybercop23 commented 1 month ago

Hmmmm... I was able to add CC in about 20 seconds on a Mac, on the full, original rgbeffects... How long does it take for you?

blun23 commented 1 month ago

It was like 18 minutes. It could be I'm bottlenecked with my 8gb processor. I'm just gonna keep adding props in another layout then importing them in through the rgbeffects file.

blun23 commented 1 month ago

Hmmmm... I was able to add CC in about 20 seconds on a Mac, on the full, original rgbeffects... How long does it take for you?

Hmmmm... I was able to add CC in about 20 seconds on a Mac, on the full, original rgbeffects... How long does it take for you?

Was that on my layout? What size Mac are you using by chance?

cybercop23 commented 1 month ago

M2/16gb. Yeah... 8 will be a problem. See Dan's reply on FB about the min memory.