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

"Loading project" percentage incorrect #3611

Closed
musikBear opened this issue Jun 4, 2017 · 17 comments · Fixed by #3672
Closed

"Loading project" percentage incorrect #3611

musikBear opened this issue Jun 4, 2017 · 17 comments · Fixed by #3672
Labels

Comments

@musikBear
Copy link

lmms 1.1.90
win32 xp3

Is there a std sequence in project loading.
More specific, does loading always follow the same sequence,
First loading is instruments, then automation then.....
OR
is it different from project to project, depending on the actual structure of the projectfile. Eg loading as a kind of 'what is to come first on screen, will be loaded first'.
I am trying to figure out what the last 2% that loads during a specific project loading, is.
I would like to know, because I experience load freezing.
After 98% loading, lmms 'jump back' to 82% loaded, and there lmms freeze. Have others seen behaviour that 'revert-jump' after 98% loading?

@tresf
Copy link
Member

tresf commented Jun 4, 2017

Have others seen behaviour that 'revert-jump' after 98% loading?

Yes.

@musikBear
Copy link
Author

@tresf That is not enough information
One word is not.
So in what situation, and did you manage to find a reason for a revert from 98% to 82%
If the loading sequence is sequential, then a revert would mean some kind problem in that sequence.
If you have information about the loading sequence it would be valuable.

@tresf
Copy link
Member

tresf commented Jun 5, 2017

@tresf That is not enough information

We are all seeing the 68%, 36%, 99% problem and the intent of my Yes answer was to answer the portion that was known, without speculating.

Perhaps you can learn C++ and help yourself out. That would be valuable and would avoid unnecessary ad hominem (which I'm now equally guilty of) ;)

@tresf tresf changed the title [code question] What is the default sequence for project loading? "Loading project" percentage incorrect Jun 5, 2017
@PhysSong
Copy link
Member

The "Loading project" percentage is calculated in TrackContainer::loadSettings(). It counts objects per track, not total objects of whole song.
When every track starts loading, pd->setMaximum( pd->maximum() + _this.childNodes().count() ) is called. It causes the "revert-jump" because the progress displayed in the dialog is value/maximum*100%.
There's an solution, counting total object first and setting maximum value of progressive dialog to it. However, it can slower the loading of projects slightly.
@tresf How do you think about it?

@musikBear
Copy link
Author

However, it can slower the loading of projects slightly.

Imo not a good idea. Project loading in rc3 is already significantly slower than previously. A different thought could be not to show percentage at all, but show the actual number of objects, like
Total to Load : xxxxxx Loaded : ...xxx
Then it would be of no importance in witch order the objects was loaded, but the real issue was: what object-load made the loading halt after a revert, and often at 68 or 82 %, and then freeze lmms.

@tresf
Copy link
Member

tresf commented Jun 26, 2017

Imo not a good idea.

Please stop. This isn't a peanut gallery. The performance implications of his proposal are in milliseconds and he's proposing a fix for YOUR bug. Don't back people into corners with rhetoric please.

@tresf How do you think about it?

👍

@PhysSong
Copy link
Member

The performance implications of his proposal are in milliseconds

I've tested by counting object number 1000 times, @tresf is right.
I'll do more tests and make a PR if I works properly.

@softrabbit
Copy link
Member

How about being more informative, like displaying the track names as they're being loaded? That would be helpful in reporting any loading troubles. Something like "Loading track 7/11 (Big Chords)"

@musikBear
Copy link
Author

@softrabbit that would be a extension of the 'count of objects', so good imo.

@PhysSong
Copy link
Member

@softrabbit Good idea. I'll try to implement it.

@PhysSong
Copy link
Member

Now I'm preparing for the PR, but there's a problem: Fixing incorrect loading percentage is a bug fix. Is showing track name on loading a bug fix?
If it is, only one PR is needed. If it isn't, I should make two separate PRs(One for bug fix, the other for this new feature).

@zonkmachine
Copy link
Member

I think one PR in two separate commits against stable-1.2 will be fine.

@tresf
Copy link
Member

tresf commented Jun 28, 2017

If this is a regression in 1.2, ok. If this is not a regression, we should aim these at master.

@PhysSong
Copy link
Member

PhysSong commented Jun 28, 2017

Then @tresf do you think showing track name on loading is a regression on 1.2? Or not, why?
For more details, see my project-load branch.

@tresf
Copy link
Member

tresf commented Jun 28, 2017

I'm talking about #3611 (bug) in general, not the enhancement mentioned. It would certainly be silly to decouple the enhancement if it's a quick fix, so @zonkmachine's advice would be favored.

@PhysSong
Copy link
Member

Okay. I'll do some more tests and make a PR soon.

@PhysSong
Copy link
Member

PhysSong commented Jul 3, 2017

Please test my PR and give feedback to me.

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

Successfully merging a pull request may close this issue.

5 participants