TechDraw Multithread Testing

Discussions about the development of the TechDraw workbench
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Post Reply
User avatar
Tandini
Posts: 37
Joined: Sat Jul 09, 2016 6:14 pm

Re: Multithread Testing

Post by Tandini »

Is it possible to test that on Windows?
User avatar
wandererfan
Veteran
Posts: 6268
Joined: Tue Nov 06, 2012 5:42 pm
Contact:

Re: Multithread Testing

Post by wandererfan »

user1234 wrote: Sun Jul 31, 2022 4:12 pm Log: TIMING - ProjItem001 GO spent: 294.545 millisecs in HLRBRep_PolyAlgo & co
I have to make some changes to handle the polygon approximation version of the HLR algos. That should fix this.
User avatar
wandererfan
Veteran
Posts: 6268
Joined: Tue Nov 06, 2012 5:42 pm
Contact:

Re: Multithread Testing

Post by wandererfan »

babaroga wrote: Sat Jul 30, 2022 9:14 pm In a matter of fact, there is one issue. When creating 3d view "Scale type" is set to Automatic and scale is set to 1.
I would stay away from Automatic, while I figure out how to fix this.

<techno-babble>The Scale property is getting updated and triggering AutoDistribute in the main thread, while the geometry is being calculated off in another thread using the old scale. </techno-babble>
User avatar
wandererfan
Veteran
Posts: 6268
Joined: Tue Nov 06, 2012 5:42 pm
Contact:

Re: Multithread Testing

Post by wandererfan »

Tandini wrote: Mon Aug 01, 2022 1:50 pm Is it possible to test that on Windows?
I don't think we have a facility for testing branches in Windows. You'd have to compile the branch yourself.

@Kunda1 is there an equivalent to branch based snaps in the Windows world?

I'd like to see this tested in Windows, as I don't have a Windows environment at the moment.
User avatar
babaroga
Posts: 178
Joined: Sun Aug 14, 2016 6:52 pm
Location: Banja Luka, Republic of Srpska, Bosnia and Herzegovina

Re: Multithread Testing

Post by babaroga »

Ok. I figured that by myself.

My father used to say:
More automatic, more problematic.. :-)
User avatar
wandererfan
Veteran
Posts: 6268
Joined: Tue Nov 06, 2012 5:42 pm
Contact:

Re: Multithread Testing

Post by wandererfan »

babaroga wrote: Mon Aug 01, 2022 3:19 pm My father used to say:
More automatic, more problematic.. :-)
He was obviously a smart man!
User avatar
wandererfan
Veteran
Posts: 6268
Joined: Tue Nov 06, 2012 5:42 pm
Contact:

Re: Multithread Testing

Post by wandererfan »

New version again. Problem with v019 file (Async motor) and polygon algo fixed. Problem with ScaleType Automatic also fixed I think. Don't know about the piece of the bed sticking out of the page. @balrobs any chance of a test file?
User avatar
babaroga
Posts: 178
Joined: Sun Aug 14, 2016 6:52 pm
Location: Banja Luka, Republic of Srpska, Bosnia and Herzegovina

Re: Multithread Testing

Post by babaroga »

Hello,

With new fixes, everything now seems to be OK. Automatic scaling is working, and there is no hidden underlying geometries.

I cannot measure, but my subjective feeling is that everything works ever faster than before. Anyway fans on my laptop does not spin like it is going to fly away.
Today I am busy with some paperwork, but tomorrow will test it in working environment. I will report if I spot anything.
User avatar
wandererfan
Veteran
Posts: 6268
Joined: Tue Nov 06, 2012 5:42 pm
Contact:

Re: Multithread Testing

Post by wandererfan »

A new snap is available for those that don't want to compile their own.

Code: Select all

$ sudo snap install --channel=edge/pr-44 freecad

  # If you already have the freecad snap installed
  $ sudo snap refresh --channel=edge/pr-44 freecad 

  # Experimental: Parallel install (see https://snapcraft.io/docs/parallel-installs)
  $ sudo snap set system experimental.parallel-instances=true
  $ sudo snap install --channel=edge/pr-44 freecad_pr44
  $ freecad_pr44 # Run it
Would like to see this tested on Windows before it goes to master. Any volunteers?
user1234
Veteran
Posts: 3333
Joined: Mon Jul 11, 2016 5:08 pm

Re: Multithread Testing

Post by user1234 »

wandererfan wrote: Tue Aug 02, 2022 10:52 pm New version again. Problem with v019 file (Async motor) and polygon algo fixed.
Yes, works thanks!

I did a little stress test. When change often really fast scale, direction, generally views or anything else with many views like in the projection group task, then FreeCAD can (must not) crash. Normally that is not a problem, if that happens, then someone demand this.

1.png
1.png (29.67 KiB) Viewed 1195 times

Code: Select all

Err: Program received signal SIGSEGV, Segmentation fault.
Err: #0  /lib/x86_64-linux-gnu/libc.so.6(+0x3bd60) [0x7f1720eeed60]
Err: #1  0x7f15bb0a0553 in TechDraw::GeometryObject::addFaceGeom(std::shared_ptr<TechDraw::Face>) from /home/user/Programs/FreeCADhlrThreadrc1/build/Mod/TechDraw/TechDraw.so+0x3
Err: #2  0x7f15bb0308dc in TechDraw::DrawViewPart::extractFaces() from /home/user/Programs/FreeCADhlrThreadrc1/build/Mod/TechDraw/TechDraw.so+0xaac
Err: #3  0x7f15bb0313f5 in non-virtual thunk to QtConcurrent::RunFunctionTask<void>::run() from /home/user/Programs/FreeCADhlrThreadrc1/build/Mod/TechDraw/TechDraw.so+0x25
Err: #4  /lib/x86_64-linux-gnu/libQt5Core.so.5(+0xcfed2) [0x7f172132eed2]
Err: #5  /lib/x86_64-linux-gnu/libQt5Core.so.5(+0xccbe1) [0x7f172132bbe1]
Err: #6  /lib/x86_64-linux-gnu/libpthread.so.0(+0x8ea7) [0x7f1720e99ea7]
Err: #7  /lib/x86_64-linux-gnu/libc.so.6(clone+0x3f) [0x7f1720fb0def]
Err: Program received signal SIGSEGV, Segmentation fault.
Err: #0  /lib/x86_64-linux-gnu/libc.so.6(+0x3bd60) [0x7f1720eeed60]
Err: #1  [0x55643d1264f0]

Greetings
user1234
Post Reply