Author Topic: Speed up a lisp routine  (Read 4947 times)

0 Members and 1 Guest are viewing this topic.

cadabyss

  • Guest
Re: Speed up a lisp routine
« Reply #15 on: January 08, 2010, 09:53:39 PM »
Chris,

Selecting 3000 blocks must consume a large portion of the running time if the system variable HIGHLIGHT is on.  Try turning it off and see if that helps.  Just a thought.

Kerry

  • Mesozoic relic
  • Seagull
  • Posts: 11654
  • class keyThumper<T>:ILazy<T>
Re: Speed up a lisp routine
« Reply #16 on: January 08, 2010, 09:59:32 PM »
<.. > below is a program that I have that checks the scale of a selection set of blocks, if it isnt right, it changes it.  however, the program is very slow when it runs - it takes about 6 seconds to correct 3000 blocks.  i'd like to reduce this to almost instant, if it is even possible.  Does anyone have an suggestion on how to make this run faster?
Code: [Select]
< .. >
Thanks,

Seems a little like complaining about loading the dishwasher.

Seriously ;
If it takes an hour of your time to reduce that 6 seconds to 4 seconds
.. assuming every drawing you use it on has 3000 blocks
It will take  1800 drawings to recover your time/effort.

some days it takes me 2 seconds to find the key I want on the keyboard :)

kdub, kdub_nz in other timelines.
Perfection is not optional.
Everything will work just as you expect it to, unless your expectations are incorrect.
Discipline: None at all.

Chris

  • Swamp Rat
  • Posts: 548
Re: Speed up a lisp routine
« Reply #17 on: January 11, 2010, 12:17:22 PM »
yes I understand, but when the program is being run everytime autosave fires, you are looking at 60 times a day (assuming you only work 6 out of 8 hours) so pay back is in a few weeks.  And I was hoping to reduce to 1 or 2 seconds.  I'm also looking to be able to use any info provided here for other programs in the future, If I can learn more efficient ways of programming, I can shave time off all the routines I write.  :-)
Christopher T. Cowgill, P.E.
AEC Collection 2020 (C3D)
Win 10

JohnK

  • Administrator
  • Seagull
  • Posts: 10648
Re: Speed up a lisp routine
« Reply #18 on: January 11, 2010, 12:33:03 PM »
Ah, well thats a whole new animal --Procedure design-. Depends on what factors/criteria you want at the time; maintenance, portability, speed, etc.  There isnt a one good solution for every case. Use of, block structure, free or bound variables, etc...this is a HUGE subject.
TheSwamp.org (serving the CAD community since 2003)
Member location map - Add yourself

Donate to TheSwamp.org

Chris

  • Swamp Rat
  • Posts: 548
Re: Speed up a lisp routine
« Reply #19 on: January 11, 2010, 12:35:07 PM »
It is a huge subject, but if I can pick up small parts here and there, it will make me a better programmer.
Christopher T. Cowgill, P.E.
AEC Collection 2020 (C3D)
Win 10

JohnK

  • Administrator
  • Seagull
  • Posts: 10648
Re: Speed up a lisp routine
« Reply #20 on: January 11, 2010, 12:43:18 PM »
Thats why i wrote an intro article on the subject. Have you read my `Methods' paper?

http://www.theswamp.org/index.php?topic=5203.0
TheSwamp.org (serving the CAD community since 2003)
Member location map - Add yourself

Donate to TheSwamp.org

Chris

  • Swamp Rat
  • Posts: 548
Re: Speed up a lisp routine
« Reply #21 on: January 11, 2010, 12:45:24 PM »
Thats why i wrote an intro article on the subject. Have you read my `Methods' paper?

http://www.theswamp.org/index.php?topic=5203.0
not yet, but I have it downloaded and will read it.
Christopher T. Cowgill, P.E.
AEC Collection 2020 (C3D)
Win 10

JohnK

  • Administrator
  • Seagull
  • Posts: 10648
Re: Speed up a lisp routine
« Reply #22 on: January 11, 2010, 12:49:22 PM »
so whats your question then?
TheSwamp.org (serving the CAD community since 2003)
Member location map - Add yourself

Donate to TheSwamp.org

Chris

  • Swamp Rat
  • Posts: 548
Re: Speed up a lisp routine
« Reply #23 on: January 11, 2010, 12:51:01 PM »
so whats your question then?
I'll let you know when I get done reading, and trying. :-)
Christopher T. Cowgill, P.E.
AEC Collection 2020 (C3D)
Win 10