Ian Branch 127 Posted May 27, 2019 Hi Team, D10.3.1, 32Bit, Win 10 64Bit PC. I am running a pretty good Dev PC. I am working on a pretty large project, approx 305 .pas files/forms. If I make some changes and tell Delphi to Close All, it can take more than 10 minutes before Delphi finishes and I can continue. There doesn't seem to be a lot happening as far as the PC itself is concerned, the CPU usage sits at around 12-13%. See attached. Is there anything I can tweak to improve the save/close time? Regards & TIA, Ian 1 Share this post Link to post
Darian Miller 361 Posted May 27, 2019 Could be external in nature. If you have anti-virus running exclude the directories containing the .pas files (or enter a system-wide exclusion for *.pas, *.dpr, *.dproj) Otherwise check out IDE Fix Pack Share this post Link to post
Ian Branch 127 Posted May 27, 2019 Hi Darian, Thank you for your suggestions. I have IDE Fix Pack installed. I uninstalled my AV totally to test. Still took 13 minutes or so to save & close the project. Added info: All drives are SSDs. Regards, Ian Share this post Link to post
Ian Branch 127 Posted May 27, 2019 Interesting - The same project, making the same changes across the entire project, takes less than 30 seconds to save/close in D2007. Share this post Link to post
dummzeuch 1505 Posted May 27, 2019 The CPU sitting at 13% probably means that something is using one core at 100%. So I would not subscribe to this view: 4 hours ago, Ian Branch said: There doesn't seem to be a lot happening as far as the PC itself is concerned, the CPU usage sits at around 12-13%. See attached. Have you tried to disable all IDE extensions to check whether it is caused by one of these? 4 Share this post Link to post
Edwin Yip 154 Posted May 27, 2019 50 minutes ago, dummzeuch said: The CPU sitting at 13% probably means that something is using one core at 100%. So I would not subscribe to this view: Have you tried to disable all IDE extensions to check whether it is caused by one of these? I'd like to add that, GExperts has an 'Expert Manager' for that task. Share this post Link to post
Ian Branch 127 Posted May 27, 2019 Hi Tomas, Yes, one core is being maxed out for a good % of its time. Delphi itself is sitting at around 10% of CPU usage. As far as I can tell, I have disabled almost all IDE extensions with the exception of GExperts, of course. Same 13 minutes to save/close. The project itself uses no 3rd Party libraries/components with the exception of DBISAM for the Database. The .dfm files are all text not binary. Regards, Ian Share this post Link to post
stijnsanders 35 Posted May 27, 2019 Would mounting a RAM-disk (perhaps with something like ImDisk) work with speeding it up? Share this post Link to post
RonaldK 18 Posted May 27, 2019 (edited) Does your project use visual inheritance? (TForm/TDatamodule inherited from other?) Edited May 27, 2019 by RonaldK Share this post Link to post
Ian Branch 127 Posted May 27, 2019 stijnsanders - Didn't make any difference. RonaldK - No. Thanks for your thoughts guys. Ian Share this post Link to post
Dalija Prasnikar 1396 Posted May 27, 2019 The only other ideas I have is trying to disable themes - they slow down opening and closing process - https://dalijap.blogspot.com/2019/05/disable-delphi-rio-ide-theme.html And the other culprit is Welcome screen - https://quality.embarcadero.com/browse/RSP-21973 https://quality.embarcadero.com/browse/RSP-22257 You can either close Welcome tab and try saving... or rename Welcomepage folder Share this post Link to post
Ian Branch 127 Posted May 27, 2019 Hi Dalija, I closed the Welcome tab - Didn't make any difference. What I did try was to Save the Project before Closing all. It save very quickly. I could see all the modified files, .pas & .dfm get updated in the directory very quickly. I then went Close All - That is what is taking so long..:-( Ian Share this post Link to post
timfrost 78 Posted May 27, 2019 Sysinternals tools may give you a clue as to what is happening. Process Monitor filtered on the Delphi process will show you if the active thread is busy accessing the file system or the registry, and Process Explorer will display the active threads of the process and can snapshot the stack of each one - it can show much more information about the process than Task Manager. 2 1 Share this post Link to post
jbg 239 Posted May 27, 2019 If it is neither the file system nor registry accesses, then you could try to debug the Delphi IDE (with another Delphi instance) and pause the debugged IDE while it is taking its time to save the project. Then you can switch to the main-thread and look at the call stack to find out what the IDE is doing. How to debug the Delphi IDE itself. 2 1 Share this post Link to post
Achim Kalwa 61 Posted May 27, 2019 Hello Ian, Just a shot in the dark: Disable "TrackingSystem250.bpl" from the "Known IDE Packages": Close the Delhi IDE, run Regedit.exe and navigate to "HKEY_CURRENT_USER\Software\Embarcadero\BDS\19.0\Known IDE Packages". Find the entry named "$(BDS)\Bin\TrackingSystem250.bpl", and change the value (not the name!) to start with an underscore _ char. Close Regedit and try again with your project. HTH Achim Share this post Link to post
Anders Melander 1784 Posted May 27, 2019 My bet would be cloud storage: Try disabling iTunes, GDrive, OneDrive, DropBox etc. if you have them. For some reason these don't show up in Process Explorer (probably because they work on a too low level), but in my experience they can completely kill system performance. Every so often members of my family will ask for a new computer because it's gotten so slow they can't use it. I've tried, in vain, to explain to them that hardware doesn't get slower with age (my main workstation is actually the oldest in the household) but they persist. So I just uninstall or disable the various cloud storage services they use and just like that their system runs like new again. 1 Share this post Link to post
Ian Branch 127 Posted May 27, 2019 Hi Team, Tim, jbg, Sorry that is out of my knowledge/skill set. :-( Achim, Anders, Regretfully neither made any difference. :-( Thank you all for your suggestions. Regards, Ian Share this post Link to post
David Heffernan 2345 Posted May 27, 2019 Put madExcept in the IDE via a package and then use madTraceProcess to find out what it is doing whilst saving. 1 Share this post Link to post
Edwin Yip 154 Posted May 28, 2019 6 hours ago, David Heffernan said: Put madExcept in the IDE via a package and then use madTraceProcess to find out what it is doing whilst saving. Interesting approach! Maybe the OP should try it, But I failed to find document about that function. Share this post Link to post
Ian Branch 127 Posted May 28, 2019 Hi Team, et al, This has consumed too much of my time. 305 files, if I do a global component replace with GExperts, say TButton to TBitBtn, then save the project, the files save very quickly, it is the closing that takes around 13 minutes. As I can edit and do what I need to do in D2007, and save/close in under 30 secs, I will do all my updating there. Thank you all for your suggestions although some of them are out of my ken. ;-) Regards, Ian 1 Share this post Link to post
David Heffernan 2345 Posted May 28, 2019 2 hours ago, edwinyzh said: Interesting approach! Maybe the OP should try it, But I failed to find document about that function. Type that word into Internet search engine..... Share this post Link to post
Anders Melander 1784 Posted May 28, 2019 2 hours ago, Ian Branch said: ... save the project, the files save very quickly, it is the closing that takes around 13 minutes. Sorry. Didn't read your description properly. I thought it was the save that was slow. I've encountered projects that took a long time closing but I can't remember what I did to solve it. I don't know if Live Bindings can affect close performance like they do open. One of my clients has a project where one of the datamodules has almost 200 datasets and thousands of persisted fields. Before I disabled Live Bindings there it took in the neighborhood of 15 minutes to just open this datamodule. Now, with Live Bindings disabled it takes less than a second. Anyway, you can easily get a call stack of the Delphi IDE with Process Explorer. Double click bds.exe, view threads, double click the thread with the highest CPU usage. That should give you (or us, if you post the call stack here) a clue about what it's doing. 2 Share this post Link to post
Ian Branch 127 Posted May 28, 2019 Hi Anders, Partially my fault, I initially thought it was the save action until I saw that it wasn't and it was in fact the close. YESSSS!!!!!! All good now. I disabled the 3 LiveBindings libraries and now the save/close all takes around 10 seconds. :-) Having now done that, I seem to recall a similar thing a couple of years ago. Note to self - Disable LiveBindings when any new Delphi comes along. Thanks Anders, and to all the other contributors. Regards, Ian 2 2 Share this post Link to post
Sherlock 663 Posted May 28, 2019 LiveBindings are a toy, at best, anyway. So don't worry about disabling them. 1 Share this post Link to post
haentschman 92 Posted May 28, 2019 Quote I disabled the 3 LiveBindings libraries Please give a tutorial... 1 Share this post Link to post