Jump to content

Lisp & AutoCAD 2014 vs. 2019 Performance - Why the Difference?


GregGleason

Recommended Posts

I have an acaddoc.lsp that runs in either AutoCAD 2014 or 2019.  It calls 3 routines to run.  On 2014 it takes a total of 1.5 seconds to run but with 2019 it takes 97.8 seconds.  The files are exactly the same and the lisp routine is exactly the same.  One of the routines is Lee Mac's Update TitleBlock program (which to me is a thing of beauty).  Under 2014 it took 0.6 seconds but with 2019 it took 10.8 seconds (same code, looking at the same .csv file).

 

Is there a setting that I can check to improve the performance of 2019?

Link to comment
Share on other sites

apparently you're not the only one having problems with AutoCAD 2019. Some of them will be fixed by installing service pack. Starting to think that AutoCAD 2019 should have been named AutoCAD Vista

 

http://opendcl.com/forum/index.php?topic=2588.0

 

Have never tried 2019 but have tried 2020 and can't put my finger on it but somehow it has a different feel. Not sure yet if it's a good or a bad thing.

Link to comment
Share on other sites

6 hours ago, Roy_043 said:

Same machine? Same OS?

 

The AutoCAD 2014 is Win 7 run on a 2 yo desktop, whereas the AutoCAD 2019 is Win 10 run on a laptop.  The benchmarks for the laptop are supposed to be better.

 

Greg

Link to comment
Share on other sites

This code took less than a second with AutoCAD 2015 and 73 seconds 😴 with AutoCAD 2019 (same file and same routine).

 

(defun ChangeStyle (strStyle1 strStyle2 / entItem objBlock objDocument objItem )
 (vl-load-com)
 (setq objDocument (vla-get-activedocument (vlax-get-acad-object)))
 (if (and (tblobjname "style" strStyle1)
          (tblobjname "style" strStyle2)         
     )
  (vlax-for objBlock (vla-get-blocks objDocument)
   (if (> (vla-get-count objBlock) 0)
    (progn
     (setq objItem (vla-item objBlock 0)
           entItem (vlax-vla-object->ename objItem)
     )
     (while entItem
      (if (and (vlax-property-available-p (setq objItem (vlax-ename->vla-object entItem)) "StyleName")
               (= (strcase (vla-get-stylename objItem)) (strcase strStyle1))
          )
       (vla-put-stylename objItem strStyle2)
      )
      (setq entItem (entnext entItem))
     )
    )
   )
  )
  (princ "\nError check if styles exist: ")
 )
 (vla-regen objDocument 0)
)

 

This is what the calling code looks like:

 

(setq mypath (getvar "dwgprefix"))                   ; Read and set current directory path
(setq mylisp "ChangeStyle.lsp")                      ; Set the lisp routine name
(setq mypatlsp (strcat mypath mylisp))               ; Set the path/file of the lisp routine name
(princ "\nChange style 2 .......\n")
(load mypatlsp)                                      ; Load program
(ChangeStyle "Standard" "GTEXT-1")                   ; Run the Style Change program

 

Greg

Link to comment
Share on other sites

15 hours ago, BIGAL said:

Maybe take the routines out of acaddoc and appload saving into history to auto load. 

 

BIGAL, I am not familiar with this strategy for helping execution.  Perhaps I will run a test and see if it makes any difference in the performance.

 

Greg

Link to comment
Share on other sites

6 hours ago, rlx said:

apparently you're not the only one having problems with AutoCAD 2019. Some of them will be fixed by installing service pack. Starting to think that AutoCAD 2019 should have been named AutoCAD Vista

 

http://opendcl.com/forum/index.php?topic=2588.0

 

Have never tried 2019 but have tried 2020 and can't put my finger on it but somehow it has a different feel. Not sure yet if it's a good or a bad thing.

 

Have you seen similar performance with 2020 as you did with pre-2019 software? 

 

I can live with a 1 or 2% drop in performance, but a change that is orders-of-magnitude is something I need to figure out fast.

 

Greg

Link to comment
Share on other sites

tried your change style routine on 2017 and 2020 (both on the same machine) and 2020 was the fasted. About 7 seconds for 229 blocks in 2017 and 5 or 6 seconds in 2020. Maybe low on memory? Faster laptop may be no guarantee if AutoCAD is low on resources?

  • Like 1
Link to comment
Share on other sites

2 hours ago, rlx said:

tried your change style routine on 2017 and 2020 (both on the same machine) and 2020 was the fasted. About 7 seconds for 229 blocks in 2017 and 5 or 6 seconds in 2020. Maybe low on memory? Faster laptop may be no guarantee if AutoCAD is low on resources?

 

That's a helpful benchmark rlx.  I will try to get my hands on 2020 and see if there is a difference.

 

Greg

Link to comment
Share on other sites

Ok, the plot thickens.

 

Another computer had the file locked and I ran a test on the file in read-only.  Instead of 90+ seconds it opened in 20 seconds.

 

I don't know what to make of that.

 

Greg

Link to comment
Share on other sites

digital-voodoo? made your mother-in-law / girlfriend / wife angry and now your computer(s) is / are cursed? back-ground processes like windows update? system monitoring / scanning running? If you terminate all external influences , including opening a file from a network connection instead of local, what remains however improbable must be the truth 

sherlock.jpg

 

only performance issue I had @work was caused by some dead links in my profile. By making as much local as possible and disabeling all fancy AutoCAD 'smuck' (by disabeling everything that was nice to have but not need to have) I got a much better responsive system.

Edited by rlx
Link to comment
Share on other sites

The plan is to create a light setup: Just the OS, whatever's needed for network, and AutoCAD and find out the truth.

 

Regardless, I need the throw down the "ain't nobody got time for that" meme.

 

Greg

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...