Dorico shuts down very slowly on huge project.

The project size: 4 flows, 60 players, 120 staves, 3500 bars of music.

Memory usage, with “Silent” playback template, is about 25 Gb running on Windows 10 pro. The .dorico project file size is about 40 Mb.

When I quit Dorico, the main window disappears immediately, but there is then several minutes wait before the Hub window appears. In that time, something is apparently running on a single CPU thread, and the memory usage slowly ramps down from 25 Gb to around 4 Gb.

Presumably something is “carefully” freeing memory piece by piece in the reverse order to how it was allocated, rather than freeing all of it in one operation.

Paul might have some thoughts about this, but it might be interesting to sample Dorico using Process Monitor when closing this project, then zip up and attach the logs here.

I’m not sure what you mean Daniel - are you talking about this tool?

I think we’d need to see the project

I’ve sent Paul a PM with a dropbox link to the .dorico file.

Yes, ProcMon is indeed Process Monitor. But I guess Paul will take a look when he gets a chance.

Thanks for passing this on. This really is a huge score (in terms of memory). I’m not sure at a glance why it’s using quite that much. Do you have a copy of the score at a more intermediate state which might be a bit more manageable to analyse?

I can see that pretty much 90% of the score closing time is just inside the OS memory free-ing code. I think it’s just the sheer magnitude of it that takes the time. Plus, there’s likely to be a lot of thrashing as things get swapped out to disk.

I’m running on a PC with 32GB RAM so I don’t think there is any swapping going on at the OS level.

I started from four MusicXML files one for each flow, so I guess the Sibelius guy had the project as 4 separate Sibelius files.

You can export the 4 flows if you want to downsize it. The project file sizes will be about 16, 6, 18, and 6 Mb. The number of bars in each are about 1100, 350, 1450, and 400.

The problem isn’t noticeable for me on the “small” Flows 2 and 4. I could split the two big flows into more pieces while working on them - but IMO the bottom line is that Dorico “ought” to be able to handle big projects without artificially splitting them up!

Apart from the size, I can’t think of anything particularly strange about this, except for the fact that there are time signature changes almost every bar, and they don’t follow any regular pattern so trying to convert to the “clever time signature options” in Dorico probably wouldn’t make much difference.

The team were as surprised as I was to find the memory usage so high on this score. James thinks that there may be a few issues that emerge from a further analysis of it, when time permits.

Another thought - the chorus (S A T B) and the string section all have several divisi changes, up to “a 8” for all the vocal parts and the violins. (The lower strings are up to “a 4”, IIRC).