Hello to all,
I'm trying to use dwg2svg script in linux to batch convert some dwg files. I've seen that it uses only one core (thread) and don't expand to multi... is it right?
It is possible to use it in multithread mode?
Thank you so much
A.
Question about multithreading
Moderator: andrew
Forum rules
Always indicate your operating system and QCAD version.
Attach drawing files and screenshots.
Post one question per topic.
Always indicate your operating system and QCAD version.
Attach drawing files and screenshots.
Post one question per topic.
Re: Question about multithreading
Questions:
Does QCAD in GUI mode uses more than one thread? See Application Preferences.
And does that setting play a role without GUI?
The changelog only sums up multithreading for display purpose and for nesting ...
Regards,
CVH
Does QCAD in GUI mode uses more than one thread? See Application Preferences.
And does that setting play a role without GUI?
The changelog only sums up multithreading for display purpose and for nesting ...
Regards,
CVH
Re: Question about multithreading
You can leverage your CPU cores by launching your conversion tasks in parallel in your Linux bash script. For example:
The ampersand "&" at the end of the dwg2svg command starts the dwg2svg command as background process and immediately continues with the execution of the script, i.e. the conversion of the next file. The wait at the end waits until all background processes have finished.
Note that the above script is greatly simplified. You will want to make sure that you don't start more than X processes in parallel, depending on the number of CPU cores.
Code: Select all
for f in *.dxf
do
dwg2svg -f "$f" &
done
wait
Note that the above script is greatly simplified. You will want to make sure that you don't start more than X processes in parallel, depending on the number of CPU cores.