#619 Made TreeView stable

Merged, abandoned or rejected pull requests are moved here to clear the main Pull Requests forum.
realthunder
Veteran
Posts: 2190
Joined: Tue Jan 03, 2017 10:55 am

Re: #619 Made TreeView stable

Post by realthunder »

Okay, the problem is confirmed. QTreeWidgetItem::takeChildren is an expensive operation under Windows, but cheap on Linux. However, without takeChildren, the treeview can't easily reflect order change in claimChildren. I'll think a better way to handle this later. It's 4am here, I'd better take some rest now.
Try Assembly3 with my custom build of FreeCAD at here.
And if you'd like to show your support, you can donate through patreon, liberapay, or paypal
wmayer
Founder
Posts: 20243
Joined: Thu Feb 19, 2009 10:32 am
Contact:

Re: #619 Made TreeView stable

Post by wmayer »

realthunder wrote:How to check?
In the preferences under Edit > Preferences > Viewer > 3D-Viewer. There you will find the entry Use OpenGL Vertex Buffer Object (experimental)
But it's unlikely that this has an impact on the issue because at this point it doesn't go through the GLRender method of the Inventor nodes.
Jom official download server is down. What are the odds of that! Care to post the binarry here?
Alternatively you can create vcxproj files with cmake and then use msbuild. I just can't remember the exact arguments to start a parallel build.
BTW, I am having trouble with Windows debug build. I am getting a bunch of unfound reference when linking OCC. Release build is fine. Any tricks on that?
Which errors do you get?
User avatar
sgrogan
Veteran
Posts: 6499
Joined: Wed Oct 22, 2014 5:02 pm

Re: #619 Made TreeView stable

Post by sgrogan »

wmayer wrote:Alternatively you can create vcxproj files with cmake and then use msbuild. I just can't remember the exact arguments to start a parallel build.
/m or /m:n where n is the number of worker threads. /m uses maximum available by default. Verbosity can also effect build performance. I use

Code: Select all

$msbuild "$buildDir\FreeCAD_trunk.sln" /m /nologo /verbosity:minimal /p:Configuration=Release "/p:Platform=$platform"
"fight the good fight"
User avatar
NormandC
Veteran
Posts: 18589
Joined: Sat Feb 06, 2010 9:52 pm
Location: Québec, Canada

Re: #619 Made TreeView stable

Post by NormandC »

realthunder wrote:I can see that the logic does have some problem. You should definitely bring this up to PartDesign, the original thread you posted. But, you can be assured that this is not Tree View's problem, and the developer of PartDesign will understand that.
OK then. Thanks.
wmayer
Founder
Posts: 20243
Joined: Thu Feb 19, 2009 10:32 am
Contact:

Re: #619 Made TreeView stable

Post by wmayer »

realthunder wrote:Okay, the problem is confirmed. QTreeWidgetItem::takeChildren is an expensive operation under Windows, but cheap on Linux. However, without takeChildren, the treeview can't easily reflect order change in claimChildren. I'll think a better way to handle this later. It's 4am here, I'd better take some rest now.
I can't confirm that it's fast on Linux. When running it under Ubuntu 14.04 as a Virtual box guest I stopped it after waiting a couple of minutes. Also commenting out the block as in PR670 doesn't make a difference.

OS: Ubuntu 14.04.5 LTS
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.17.10681 (Git)
Build type: Unknown
Branch: master
Hash: d7d7aa238f2cbfd10a9682e7213e6ef5dc990368
Python version: 2.7.6
Qt version: 4.8.6
Coin version: 4.0.0a
OCC version: 6.7.0
realthunder
Veteran
Posts: 2190
Joined: Tue Jan 03, 2017 10:55 am

Re: #619 Made TreeView stable

Post by realthunder »

wmayer wrote:I can't confirm that it's fast on Linux. When running it under Ubuntu 14.04 as a Virtual box guest I stopped it after waiting a couple of minutes. Also commenting out the block as in PR670 doesn't make a difference.
Please try my branch at https://github.com/realthunder/FreeCAD/ ... eeViewFix2. This is a simple fix I tried last night. It avoid using takeChildren and addChild back each time on object change. And I tested it fine on my Windows. The problem with this fix is that it may not reflect the order change in claimChildren, which I think is a minor problem.
Try Assembly3 with my custom build of FreeCAD at here.
And if you'd like to show your support, you can donate through patreon, liberapay, or paypal
realthunder
Veteran
Posts: 2190
Joined: Tue Jan 03, 2017 10:55 am

Re: #619 Made TreeView stable

Post by realthunder »

wmayer wrote:I can't confirm that it's fast on Linux. When running it under Ubuntu 14.04 as a Virtual box guest I stopped it after waiting a couple of minutes. Also commenting out the block as in PR670 doesn't make a difference.
I have just submitted a new PR for the fix, which still keeps track of the order of claimed children. This fix is more complicated than the simple fix I mentioned above. My own test shows it's fine. But It better be thoroughly tested by others as well.

My branch https://github.com/realthunder/FreeCAD/ ... ewFixOrder
Try Assembly3 with my custom build of FreeCAD at here.
And if you'd like to show your support, you can donate through patreon, liberapay, or paypal
wmayer
Founder
Posts: 20243
Joined: Thu Feb 19, 2009 10:32 am
Contact:

Re: #619 Made TreeView stable

Post by wmayer »

Yes, that fixes the problem. The load is again as fast as it has been. Thanks!
Post Reply