Uwe Raabe 2059 Posted October 4, 2019 6 hours ago, Jacek Laskowski said: I am still using MMX version 15 and waiting for a fix. As these problems are hard to track down, I need to dedicate some time to that fix. Unfortunately I am not able to spend a significant amount of time on MMX in the moment, so it may take a while for the V15 beta to proceed. 1 Share this post Link to post
Jacek Laskowski 57 Posted October 8, 2019 On 10/4/2019 at 6:09 PM, Uwe Raabe said: As these problems are hard to track down, I need to dedicate some time to that fix. Unfortunately I am not able to spend a significant amount of time on MMX in the moment, so it may take a while for the V15 beta to proceed. I'm not sure it's a good lead, but I have an observation related to the MMX suspension. If just before ctrl+E (entity edition) I press ctrl+S (save changes in files) I have no suspension, and every time MMX suspends Delphi I forget to press ctrl+S. This may be some kind of key 😉 Share this post Link to post
Uwe Raabe 2059 Posted October 8, 2019 Thanks, will check that. Btw, I have also seen this issue from time to time and TaskManager indicates some threads waiting for I/O completion. So that may indeed be related. Share this post Link to post
Carlos Tré 9 Posted October 10, 2019 On 10/8/2019 at 9:52 AM, Jacek Laskowski said: I'm not sure it's a good lead, but I have an observation related to the MMX suspension. If just before ctrl+E (entity edition) I press ctrl+S (save changes in files) I have no suspension, and every time MMX suspends Delphi I forget to press ctrl+S. This may be some kind of key 😉 I used to have the same problem, but it seems to have gone away after I uninstalled Mitov run time, which I did to solve a problem I was having with TListView in FMX projects - it rendered that component unusable, crashing Delphi IDE every single time I tried. -- Carlos Share this post Link to post
Jacek Laskowski 57 Posted October 14, 2019 I don't use Mitov Library. I don't use any libraries working in design time, only a few experts: CnPack, GExpert, DocumentationInsight, Code Insight Plus and RFindUnit. Share this post Link to post
Jacek Laskowski 57 Posted October 24, 2019 (edited) However, saving an entity before editing does not always help, MMX rarely hangs, but it still happens. But I have new observation. If I manually add new property to the class, but without the getter and setter (as in the picture) and press the ctrl+E shortcut, first the question appears about adding accessor methods and only after clicking "Yes" MMX hangs. Edited October 24, 2019 by Jacek Laskowski 1 1 Share this post Link to post
Jacek Laskowski 57 Posted January 8, 2020 @Uwe Raabe Some time ago I discovered that GExperts in "Uses Clause Manager" module has a parser that works in the background and creates files from the cache on the disk. Previously I suspected that MMX suspensions occur when accessing source files, so I thought GExperts might interfere with MMX somehow. I completely disabled "Uses Clause Manager" and since then the number of IDE suspensions when using MMX has dropped dramatically. It still happens, but this is maybe 10% of the previous state. I hope this helps a little bit. Share this post Link to post
Uwe Raabe 2059 Posted January 8, 2020 2 minutes ago, Jacek Laskowski said: has a parser that works in the background That's basically what MMX does, too. Besides the IDE itself (with active CodeInsight) there may as well be other plugins spawning their own parser process. This bothers me for years now. It might get better when LSP is up and working reliably, but that might take a while and will be restricted on newer Delphi versions. Thanks for the tip, though. 👍 Share this post Link to post
Uwe Raabe 2059 Posted February 23, 2020 I finally got hit by the problem myself and did some deeper investigation. It turned out that the freeze happens when System.pas was parsed in the background. It contains some constructs with conditional defines that are not handled well by the internal parser. Adding System to the list of excluded files avoids that. Then I made a complete scan over the available Delphi source files (at least those present on my development machine - alas, some platforms are missing) and found two other source files with the same problem: IdThreadSafe.pas and IdGlobal.pas. It would be great if those people affected by this problem can test this workaround and add System, IdGlobal and IdThreadSafe to the Excluded list. 1 Share this post Link to post
Jacek Laskowski 57 Posted February 23, 2020 Yuuppii! 🙂 I will try this workaround and test behaviour, thanks for effort and for support MMX! From the more complicated code I use Spring4D, FireDAC and mORMot, did you check them? Share this post Link to post
Uwe Raabe 2059 Posted February 24, 2020 Unfortunately the problem is still present. The good thing is, that I now have the environment to investigate it. May take some time though... 1 Share this post Link to post
Jacek Laskowski 57 Posted February 24, 2020 (edited) Yes, despite the exclusion of the pointed modules, I have the IDE suspension But it is worth adding that I have a suspension after I modify the interface method and then I try to edit (ctrl+E) the method in the class that corresponds to the modified interface method. This is probably the only (certainly the main >90%) case of suspension. Edited February 24, 2020 by Jacek Laskowski Share this post Link to post
Uwe Raabe 2059 Posted March 9, 2020 There is a new beta release 15.0.8.2366 available. Besides some smaller fixes it has an option to produce some CodeSite log files to track down these freezing issues. Logging can be activated in the registry. For convenience I have attached a reg file that creates the necessary entries, but doesn't activate them: Quote Windows Registry Editor Version 5.00 [HKEY_CURRENT_USER\Software\Raabe Software\MMX\15.0\Debug] "CSUseLogViewer"=dword:00000000 "CSUseLogFile"=dword:00000000 If the CSUseLogFile entry is set to 1, MMX creates a log file for each Delphi start in <My Documents>\My CodeSite Files\Logs with file name MMXLog_<timesptamp>.csl. When you encounter that freezing issue or performance drop while logging is active, just send me the corresponding log file. MMXDebug.reg Share this post Link to post
ULIK 16 Posted March 9, 2020 Uwe, having just installed this new beta, I failed to get CodeSite Logs running. I installed MMX as 'Just for me' and applied the registry change: I have set both loggers to '1' and started the IDE and tried to create such a log. But until now, nothing has been written to My CodeSite Files\Logs nor to my CodeSite Live Viewer. Is there a way to check if logging is active? At the moment my test steps were: creating a new VCL app, then added a new property by MMX Editor. Should this write some log entries? I also checked my CodeSite dispatcher log and can't see any entries. Share this post Link to post
Jacek Laskowski 57 Posted March 9, 2020 I don't make any logs either. I don't have a CodeSite installed, is it necessary? Share this post Link to post
Uwe Raabe 2059 Posted March 9, 2020 Damn, the build server intentionally removes the USE_CODESITE define for the Release, probably to avoid that slipping through. There is V15.0.9.2368 that should behave better. 45 minutes ago, Jacek Laskowski said: I don't have a CodeSite installed, is it necessary? You don't need a complete CodeSite installation. I added a separate download for CodeSite Tools which are necessary if no CodeSite is installed. If anyone has doubts installing CodeSite Tools - just don't do it. You cannot have those logs then. 1 Share this post Link to post
Jacek Laskowski 57 Posted March 9, 2020 Yes, now logs working! I wait for freeze 😉 Share this post Link to post
ULIK 16 Posted March 9, 2020 Great, now I get the logs. I enabled 'Check Packages' on 'General' settings again and tested it again: - starting the IDE - creating a new VCL App - adding a new property Still that long delay on first loading. See attached log file. MMX_Commented.csl Share this post Link to post
Uwe Raabe 2059 Posted March 9, 2020 @ULIK More than 16 seconds spent in LoadAvailableInterfaces. Does that roughly match the delay you see? Share this post Link to post
ULIK 16 Posted March 10, 2020 Yes, opening the dialog the very first time requires about 13-16 seconds, also without CodeSite logging enabled. Share this post Link to post
Uwe Raabe 2059 Posted March 10, 2020 That is a pretty long time for a rarely used feature (a property implementing an interface). I will see what can be done better here. Share this post Link to post
ULIK 16 Posted March 10, 2020 No sure that I understand you right: adding a new property to a class is not so much uncommon for me (and that's what I did: selecting the new TForm1 object and added a property. Or do you mean that there is MMX internal code doing some strange things? Share this post Link to post
Uwe Raabe 2059 Posted March 10, 2020 LoadAvailableInterfaces populates the Implements combobox at the bottom right of the property dialog. Using a property as the implementor of an interface is not that common. Share this post Link to post