Author Topic: Why so many dll's?  (Read 4331 times)

0 Members and 1 Guest are viewing this topic.

Mark

  • Custom Title
  • Seagull
  • Posts: 28683
Why so many dll's?
« on: August 16, 2005, 11:30:38 AM »
Maybe the wrong place to put this, but . . .

Of the two vertical adesk products I use: Civil 3D, Land Desktop, there are a total of  827 dlls and 315 arx files. The dlls and arx files are the makeup of the vertical products (I think). Wouldn't it be better, in terms of speed, to have all the added features included in the executable (acad.exe) instead of all the dll's and arx's files?
TheSwamp.org  (serving the CAD community since 2003)

pmvliet

  • Guest
Why so many dll's?
« Reply #1 on: August 16, 2005, 02:02:30 PM »
Well the acad.exe for 2k2,2k4 and 2k5 are over 7MB in size as it is.

for 2k2, I have 106 arx's(18MB) and 132 dll's (26MB).
2k4 has 246 dll's (40MB) and 111 arx's (16MB)
2k5 has 292 dll's (56MB) and 128 arx's (23 MB)

These are rough counts as I have a few extra arx's but not many.

I would think it boils down to size. Do your counts for verticals include base AutoCad or is that just the vertical portion?
If we combined them into one executable, 70MB would be huge.
If we then had to add your vertical, it would get even larger.

I don't have photoshop on this computer(at work), but that program takes forever and a day to open on my dual xeon's(at home). And as it loads, it scripts a list of all the other "add-ins" that it is loading.

just my randon thought....

Pieter

Keith™

  • Villiage Idiot
  • Seagull
  • Posts: 16717
  • Superior Stupidity at its best
Why so many dll's?
« Reply #2 on: August 16, 2005, 02:12:18 PM »
The main reason for having multiple DLL files is for speed ... to improve the speed ... and to make the code portable ...

Take for example any one of the dll files and if you explore the dependencies, you would find that many of the dlls are called from one or the other, being dependent upon one another for specific tasks ... imagine if everytime you wanted to draw a single 2d widget, you had to load the render library or the internet connection library ... the bottom line is that AutoCAD would be painfully slow if it did load them all into memory at runtime ... Each of those modules can be loaded (and unloaded) by the managing process acad.exe) unless they are built as "persistent", meaning the calling process cannot unload the thread without terminating it's own process.

This means that if you never use WhoHas.arx, it will never be loaded, or if you never use render then those libraries will not be loaded, thus making the program more efficient, use less resources, and have a much higher performance factor.
Proud provider of opinion and arrogance since November 22, 2003 at 09:35:31 am
CadJockey Militia Field Marshal

Glenn R

  • Water Moccasin
  • Posts: 1932
  • What idiot child of married cousins wrote this?!
Why so many dll's?
« Reply #3 on: August 18, 2005, 06:38:59 AM »
Plus, if Adesk found a bug in AcDbLine.arx, they can just fix that module and re-ship (you are on subscription aren't you? ;) )...a lot easier than repatching a x mb big file and re-shipping that.
Me

Mark

  • Custom Title
  • Seagull
  • Posts: 28683
Why so many dll's?
« Reply #4 on: August 18, 2005, 07:27:13 AM »
Quote
The main reason for having multiple DLL files is for speed ... to improve the speed ...

Then why is it so slow?

everytime I do anything outside of the standard autocad commands it takes seconds to complete!! Sorry, no speed improvement there.  :?

Quote
Plus, if Adesk found a bug in AcDbLine.arx, they can just fix that module and re-ship ...a lot easier than repatching a x mb big file and re-shipping that.

So adesk basically makes it easier for them to handle their bugs?
TheSwamp.org  (serving the CAD community since 2003)

Keith™

  • Villiage Idiot
  • Seagull
  • Posts: 16717
  • Superior Stupidity at its best
Why so many dll's?
« Reply #5 on: August 18, 2005, 08:34:42 AM »
Lets say for example that you loaded every module, every command set and every function available in AutoCAD and your vertical product. It would take several minutes to actually get the AutoCAD window to open ...

Just to see how much longer, start AutoCAD with a new drawing using a blank template, timing it as the program loads, then close AutoCAD and re-open AutoCAD selecting  one of the prebuilt templates to load. Time that ... you will see a significant decrease in performance and increase in time.

Surely you know that it is much faster to load 120 command interfaces than to load 1200 and the memory needed to utilize the unused commands would make the program respond much slower.

The reason for the delay is the load time needed for that particular module, but if you multiplied that times the 842 dlls (arx are simply dll files with a different extension and an Arx dll entry point) you would be waiting perhpas minutes to load AutoCAD instead of seconds.
Proud provider of opinion and arrogance since November 22, 2003 at 09:35:31 am
CadJockey Militia Field Marshal

Glenn R

  • Water Moccasin
  • Posts: 1932
  • What idiot child of married cousins wrote this?!
Why so many dll's?
« Reply #6 on: August 18, 2005, 08:37:28 AM »
The issue is a lot more complex than that blanket statement. From a software engineering point, if you can fix/change one module, it's a lot easier than rebuilding the whole executable.

Think of it like an engine in a car. You don't replace the whole engine if it's acting up.....you replace just the part that is stuffed.

This is basically the paradigm used in OOP. Code re-use and maintainability through compartmentalising modules.

However, having said all that, Acad is getting a LOT more complex, which requires more complex code...this comes at a price.

Have you noticed the .exe's in task manager when Acad is running? They have included these 'extra' services/dll's in for the last few releases, including one that is a bootstrapper of sorts. It decreases Acad load time specifically, because they realised it was getting slow.

Try this: Unload wscommcntraccon.arx when Acad is running and take note of your speed for a while after. I've found it's a speed killer...it's the communication centre. Unloading it will get rid of an entry in task manager btw....an executable file of the name WsCommCntr1.exe.

Incidentally, have you ever crashed out of Acad, then fired it up again and it takes essentially forever? This is because it hasn't killed a few running entries in taskmanager. You need to kill these entries, then Acad fires immmediately.

Also, if you're running AcadMap 2006 (don't know whether LDD has this) but it has a new 'skin'...you'll know what I mean as it has a 3d look to the applications title bar etc. that is not the same as previous releases.

If this is the case, try typing in 'MAPSKINMAP'....this will toggle the 'skin'.

I've noticed a significant slow down when the 'skin' is enabled.
Me