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

Fixes for project loading progress display #3672

Merged
merged 6 commits into from Jul 6, 2017

Conversation

Projects
None yet
3 participants
@PhysSong
Member

PhysSong commented Jun 29, 2017

This PR currently includes two commits: first one fixes #3611, second one is enhancement mentioned in same issue. I set base branch to stable-1.2 because of #3611 (comment) by @tresf.
It is okay to decouple two commits if needed(but I don't think the decoupling is needed).

@liushuyu This PR contains a new string which needs translation. Once it is merged, please add it to i18n source string list.
see this.

@zonkmachine

zonkmachine requested changes Jul 3, 2017 edited

I can't properly test f76cb6f as I can't reproduce the issue but it works fine. aee0f2b crashes as commented. You have some lines that go way over the recommended 80 lines. ~170 columns will wrap badly so try and make it shorter.

Show outdated Hide outdated src/core/TrackContainer.cpp
Show outdated Hide outdated src/core/TrackContainer.cpp
@zonkmachine

This comment has been minimized.

Show comment
Hide comment
@zonkmachine

zonkmachine Jul 3, 2017

Member

Backtrace for crash on command line render

(gdb) bt
#0  QProgressDialog::value (this=0x0) at dialogs/qprogressdialog.cpp:649
#1  0x000000000056882b in TrackContainer::loadSettings (this=0x237dfc0, _this=...) at /home/zonkmachine/builds/lmms/lmms/src/core/TrackContainer.cpp:127
#2  0x0000000000552c0a in SerializingObject::restoreState (this=0x237dfe0, element=...)
    at /home/zonkmachine/builds/lmms/lmms/src/core/SerializingObject.cpp:70
Member

zonkmachine commented Jul 3, 2017

Backtrace for crash on command line render

(gdb) bt
#0  QProgressDialog::value (this=0x0) at dialogs/qprogressdialog.cpp:649
#1  0x000000000056882b in TrackContainer::loadSettings (this=0x237dfc0, _this=...) at /home/zonkmachine/builds/lmms/lmms/src/core/TrackContainer.cpp:127
#2  0x0000000000552c0a in SerializingObject::restoreState (this=0x237dfe0, element=...)
    at /home/zonkmachine/builds/lmms/lmms/src/core/SerializingObject.cpp:70
@PhysSong

This comment has been minimized.

Show comment
Hide comment
@PhysSong

PhysSong Jul 3, 2017

Member

@zonkmachine Okay. I'll change the code and test it again.

Member

PhysSong commented Jul 3, 2017

@zonkmachine Okay. I'll change the code and test it again.

@PhysSong

This comment has been minimized.

Show comment
Hide comment
@PhysSong

PhysSong Jul 3, 2017

Member

pd->setValue( start_val + _this.childNodes().count() );(this line) also generated bugs, so I deleted it.
@zonkmachine I fixed code now. Could you test this again?

Member

PhysSong commented Jul 3, 2017

pd->setValue( start_val + _this.childNodes().count() );(this line) also generated bugs, so I deleted it.
@zonkmachine I fixed code now. Could you test this again?

@zonkmachine

Some more convention...

Show outdated Hide outdated src/core/Song.cpp
Show outdated Hide outdated src/core/Song.cpp
@zonkmachine

This comment has been minimized.

Show comment
Hide comment
@zonkmachine

zonkmachine Jul 3, 2017

Member

@zonkmachine I fixed code now. Could you test this again?

Crash fixed!

Member

zonkmachine commented Jul 3, 2017

@zonkmachine I fixed code now. Could you test this again?

Crash fixed!

@PhysSong

This comment has been minimized.

Show comment
Hide comment
@PhysSong

PhysSong Jul 3, 2017

Member

How about conventions?

Member

PhysSong commented Jul 3, 2017

How about conventions?

@zonkmachine

The rest of the braces too.

Show outdated Hide outdated src/core/Song.cpp
Show outdated Hide outdated src/core/Song.cpp
@PhysSong

This comment has been minimized.

Show comment
Hide comment
@PhysSong

PhysSong Jul 3, 2017

Member

@zonkmachine I checked coding conventions, and it seems to be fine now.

Member

PhysSong commented Jul 3, 2017

@zonkmachine I checked coding conventions, and it seems to be fine now.

@zonkmachine

This comment has been minimized.

Show comment
Hide comment
@zonkmachine

zonkmachine Jul 3, 2017

Member

I've tested this and it looks just fine to me. I can also confirm the fix in f76cb6f as I managed to replicate the issue. For me opening the demoproject 'DnB' most clearly demonstrated issue #3611 .

Member

zonkmachine commented Jul 3, 2017

I've tested this and it looks just fine to me. I can also confirm the fix in f76cb6f as I managed to replicate the issue. For me opening the demoproject 'DnB' most clearly demonstrated issue #3611 .

@zonkmachine

This comment has been minimized.

Show comment
Hide comment
@zonkmachine

zonkmachine Jul 6, 2017

Member

Merge?

Member

zonkmachine commented Jul 6, 2017

Merge?

@tresf

This comment has been minimized.

Show comment
Hide comment
@tresf

tresf Jul 6, 2017

Member

The code look OK. If it's all tested, please merge @zonkmachine. I assume we've tested against a bunch of different project types and that trackName logic won't blow up. :)

Member

tresf commented Jul 6, 2017

The code look OK. If it's all tested, please merge @zonkmachine. I assume we've tested against a bunch of different project types and that trackName logic won't blow up. :)

@zonkmachine

This comment has been minimized.

Show comment
Hide comment
@zonkmachine

zonkmachine Jul 6, 2017

Member

I assume we've tested against a bunch of different project types and that trackName logic won't blow up. :)

The logic doesn't blow up, but the loading time does however. I thought I had tested for that already... :(
Here's a comparison against loading Skiessi-Onion.mmpz . I believe lmms-1.0.3 might have loaded faster still. @PhysSong As you can see the loading time increases already with your first commit. This is something people have been worrying about already before this PR.
#2029
#3312

Do you see any possibilities to trim it down a bit?

$ time ../stable-1.1.3/bin/lmms ../data/projects/demos/Skiessi/Skiessi-Onion.mmpz 
real	0m3.499s
user	0m2.296s
sys	0m0.200s

$ time ../stable-1.2.0-RC3/bin/lmms ../data/projects/demos/Skiessi/Skiessi-Onion.mmpz 
real	0m5.042s
user	0m3.864s
sys	0m0.224s

$ time ./lmms-aee0f2b ../data/projects/demos/Skiessi/Skiessi-Onion.mmpz 
real	0m8.044s
user	0m6.656s
sys	0m0.288s

$ time ./lmms-097feb0 ../data/projects/demos/Skiessi/Skiessi-Onion.mmpz
real	0m7.291s
user	0m6.584s
sys	0m0.256s
Member

zonkmachine commented Jul 6, 2017

I assume we've tested against a bunch of different project types and that trackName logic won't blow up. :)

The logic doesn't blow up, but the loading time does however. I thought I had tested for that already... :(
Here's a comparison against loading Skiessi-Onion.mmpz . I believe lmms-1.0.3 might have loaded faster still. @PhysSong As you can see the loading time increases already with your first commit. This is something people have been worrying about already before this PR.
#2029
#3312

Do you see any possibilities to trim it down a bit?

$ time ../stable-1.1.3/bin/lmms ../data/projects/demos/Skiessi/Skiessi-Onion.mmpz 
real	0m3.499s
user	0m2.296s
sys	0m0.200s

$ time ../stable-1.2.0-RC3/bin/lmms ../data/projects/demos/Skiessi/Skiessi-Onion.mmpz 
real	0m5.042s
user	0m3.864s
sys	0m0.224s

$ time ./lmms-aee0f2b ../data/projects/demos/Skiessi/Skiessi-Onion.mmpz 
real	0m8.044s
user	0m6.656s
sys	0m0.288s

$ time ./lmms-097feb0 ../data/projects/demos/Skiessi/Skiessi-Onion.mmpz
real	0m7.291s
user	0m6.584s
sys	0m0.256s
@tresf

This comment has been minimized.

Show comment
Hide comment
@tresf

tresf Jul 6, 2017

Member

Does commenting out the UI call help?

Member

tresf commented Jul 6, 2017

Does commenting out the UI call help?

@tresf

This comment has been minimized.

Show comment
Hide comment
@tresf

tresf Jul 6, 2017

Member

I'm also a bit skeptical of iterating mid-for-loop although I haven't placed a debugger on it to see if it can cause problems.

Member

tresf commented Jul 6, 2017

I'm also a bit skeptical of iterating mid-for-loop although I haven't placed a debugger on it to see if it can cause problems.

@zonkmachine

This comment has been minimized.

Show comment
Hide comment
@zonkmachine

zonkmachine Jul 6, 2017

Member

No. The commit just before this PR is:

real	0m7.294s
user	0m6.724s
sys	0m0.236s

Somethings happened along the way. I'm trying a bisect.

Member

zonkmachine commented Jul 6, 2017

No. The commit just before this PR is:

real	0m7.294s
user	0m6.724s
sys	0m0.236s

Somethings happened along the way. I'm trying a bisect.

@zonkmachine

This comment has been minimized.

Show comment
Hide comment
@zonkmachine

zonkmachine Jul 6, 2017

Member

@PhysSong Sorry, it looks like false alarm. I compiled without -DCMAKE_BUILD_TYPE=DEBUG and now get the same time for stable-1.2 and PhysSong:project-load. I thought all my builds were with DEBUG but the one I compared against was not. Without debug the load time I get is about:

time ./lmms ../data/projects/demos/Skiessi/Skiessi-Onion.mmpz
real	0m4.552s
user	0m3.868s
sys	0m0.228s

This PR is all good.

Member

zonkmachine commented Jul 6, 2017

@PhysSong Sorry, it looks like false alarm. I compiled without -DCMAKE_BUILD_TYPE=DEBUG and now get the same time for stable-1.2 and PhysSong:project-load. I thought all my builds were with DEBUG but the one I compared against was not. Without debug the load time I get is about:

time ./lmms ../data/projects/demos/Skiessi/Skiessi-Onion.mmpz
real	0m4.552s
user	0m3.868s
sys	0m0.228s

This PR is all good.

@zonkmachine zonkmachine merged commit c6c67b3 into LMMS:stable-1.2 Jul 6, 2017

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details

PhysSong added a commit to PhysSong/lmms that referenced this pull request Jul 8, 2017

Fixes for project loading progress display (#3672)
Fix project loading progress jumping back.

Show the name of the track currently being loaded.

PhysSong added a commit to PhysSong/lmms that referenced this pull request Jul 8, 2017

Fixes for project loading progress display (#3672)
Fix project loading progress jumping back.

Show the name of the track currently being loaded.

@PhysSong PhysSong deleted the PhysSong:project-load branch Sep 4, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment