Jump to content
Uwe Raabe

MMX for Delphi 10.3 Rio

Recommended Posts

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.

  • Sad 1

Share this post


Link to post
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

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
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

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

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.

 

vps_2019.10.24_02.png

Edited by Jacek Laskowski
  • Like 1
  • Thanks 1

Share this post


Link to post

@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
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

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. 

  • Thanks 1

Share this post


Link to post

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

Unfortunately the problem is still present. The good thing is, that I now have the environment to investigate it. May take some time though...

  • Like 1

Share this post


Link to post

Yes, despite the exclusion of the pointed modules, I have the IDE suspension :classic_wacko:

 

 

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 by Jacek Laskowski

Share this post


Link to post

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

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

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.

  • Like 1

Share this post


Link to post

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

@ULIK More than 16 seconds spent in LoadAvailableInterfaces. Does that roughly match the delay you see?

Share this post


Link to post

Yes, opening the dialog the very first time requires about 13-16 seconds, also without CodeSite logging enabled.

Share this post


Link to post

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

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

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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
√ó