Page 1 of 1

Creating a new block is taking a lot of time

Posted: Fri Oct 25, 2019 3:38 pm
by dfriasb
Dear all,

I'm attaching a dxf drawing to this post. I'm selecting all its entities with Ctrl+A; then I create a Library Block typing B,T. This operation takes just some seconds (or less) to be completed in my computer. But... when I create a block typing B,C and with exactly the same content/entities, it's taking about 15 minutes! I don't understand why. I guess it has to be something related with graphics... Some idea?

I'm using QCAD Professional 3.23.0.0 (3.23.0) with Linux Ubuntu 18.04 LTS. My computer is a 2013 Macbook Air with 128GB of hard-disk and 4GB of RAM.

Re: Creating a new block is taking a lot of time

Posted: Fri Oct 25, 2019 7:35 pm
by Husky
Hi,

if I remember correctly ...... we already talked about this a few times. :wink:

As you know QCAD is not built to handle "very large" files.
Now you're trying to built a block/library item with approx. 12000 entities which will sum up to around 5 MB ....
And, with my lack of Macbook experience, you are running the application on a 4 MB RAM machine - that's sound not good enough to me to run CAD application.

I tested the drawing on my Win Notebook. 8 MB RAM what is in my eye the absolute minimum for a CAD application. No reasonable way to handle a 5 MB block with QCAD ...

Re: Creating a new block is taking a lot of time

Posted: Fri Oct 25, 2019 8:59 pm
by CVH
My PC doesn't even get through it in 20 minutes. :oops:

Browsed a bit while BC ran.
One remark: "Library Items" not "Library Blocks"
So I think there is a major difference between Library Items and Block Items.

Even read somewhere it is not a good idea to use blocks with the same name in Library items.
Or blocks in Library items at all.
But that were very old posts and that is not the matter here.

PS: 26 min.: BC is finished. :roll:

Edit:
Husky is right about the sheer amount of entities.
But the 5.1 Mb should not impose a problem.
Besides, it was already 4.92 Mb.

There is more then the +12000 lines on the Model Space you want to put in a block.
Most of your draftings are 'hidden' in Blocks and Paper Spaces.
Drawings on Paper Spaces is allready odd and maybe buggy.
So I isolated the map lines and ran BT, BC again.
Same results.
The map seperate in a file takes up 2.3 Mb.

What I don't understand is why all have to be included in a block.
And the use of paper space instead of layer.
I would use a Layer under Model Space for this.
Not displayed, the sheer amount won't even get in the way.

Regards,
CVH

Re: Creating a new block is taking a lot of time

Posted: Sat Oct 26, 2019 10:51 am
by dfriasb
Dear all,

Thanks a lot for reading my post and also for your answers and opinions.

I did a test and, in my opinion, there is something not working properly with Block command (B,C). I tell you why:
  • I open Tor11-13v9_qcadForumV2.dxf file
  • I create a Library Item with all the entities that it has (+12.000). I name it Tor11-13v9_qcadForumV2_Library_Item.dxf
  • I delete all entities on original Tor11-13v9_qcadForumV2.dxf file
  • Then I import library item file Tor11-13v9_qcadForumV2_Library_Item.dxf into original file (now empty) AS BLOCK.
The result is exactly the same thing I obtain when I create a block directly (B,C) into the original file. The difference is that with these steps I'm describing it only takes 1 minute 15 seconds. As I told you and as you could also try, the simple way (B,C) takes much more time (12 minutes in my last test).

Afterwards, I can work normally on this file with the block. I can rotate it, move it, edit, explode it, undo the explode to have the block again, and so on really fast.
So I guess the problem is with Block (B,C) procedure itself.

About RAM, 4GB is more than enough to manage this kind of drawings. The problems come when using other applications at the same time. At least in my case.

I'm attaching all the files.

Re: Creating a new block is taking a lot of time

Posted: Mon Oct 28, 2019 10:52 am
by andrew
I've created a task in the bug tracker at:
https://www.qcad.org/bugtracker/index.p ... sk_id=1984

Re: Creating a new block is taking a lot of time

Posted: Mon Oct 28, 2019 10:24 pm
by andrew
This has been fixed for the next release and now takes about 2-3sec.

Re: Creating a new block is taking a lot of time

Posted: Tue Oct 29, 2019 3:53 am
by CVH
Thanks, Andrew.

Followed the bugreport and commit.
That such a minor change can have that result.. e_surprised ..!!

Regards,
CVH

Re: Creating a new block is taking a lot of time

Posted: Tue Oct 29, 2019 9:26 am
by dfriasb
Thanks a lot!! Minor change, MAJOR step for blocking fans! :lol: :lol: :lol: