Slow load of project to autocad

Started by Mostafa AbdelBaset, September 25, 2024, 12:57:03 PM

Previous topic - Next topic

Mostafa AbdelBaset

Hello
i have a consideration about the load & show form function.
when i load a project multiple times to autocad it gets slower and slower each time i load the project and show the form.
i have calculated the time for repeating load project/show form for 100 times and the result was as follow in milli seconds

(156 172 172 187 188 203 204 203 187 203 219 203 219 218 250 219 235 235 250 250 250 250 265 281 265 281 281 282 281 281 297 297 281 312 328 328 313 329 344 328 344 344 344 360 375 360 375 375 375 375 390 390 391 390 391 406 391 406 422 422 422 437 437 438 438 437 438 453 454 484 468 484 468 484 468 484 485 500 500 500 516 516 531 516 531 516 532 546 547 547 547 563 562 578 578 562 578 578 594 609)

as shown the more times i load the project/show the form the slower it will be.
is there any solution to make the load process faster?

thank for your help in advance

[/size]

owenwengerd

Are you testing with the latest development build of OpenDCL Runtime? Which version of Acad? Can you attach the form and code you used to obtain these results?
Owen Wengerd (Outside The Box) / ManuSoft

Mostafa AbdelBaset

i use autocad 2022 and 2023 and both face the same problem.
the problem solved when i updated from opendcl version 9.2.03 to 9.2.3.3
i didn't update to the 9.2.4.1 version as i have no admin rights on my PC to install it right now.may be i will check later when i update to this version

this is the function i used to calculate the load project/show form time


(defun c:test ( / tmlst)
(defun timer ( / rTimeDiff)
; Check to see if the function was previously called
(if (= *g-timer-start-time* nil)
(progn
; Stores the current milliseconds
(setq *g-timer-start-time* (getvar "MILLISECS"))
(princ)
)
(progn
; Calculates and returns the time difference
(setq rTimeDiff (- (getvar "MILLISECS") *g-timer-start-time*)
*g-timer-start-time* nil)
rTimeDiff
)
)
)

(repeat 100
(timer)
(dcl_Project_Load "findreplace" T)
(dcl_Form_Show findreplace_findreplace)
(setq tmlst (cons (timer) tmlst))
(dcl-Form-Close findreplace/findreplace 1)
(command "_.delay" 200) ; take a break time after each load
)

tmlst
)


owenwengerd

There were some reason performance and resource leak fixes, so I guess those fixes resolved the problem you encountered.
Owen Wengerd (Outside The Box) / ManuSoft