Jump to content
vhanla

IDE hangs on code completion, find declaration, parameters tooltip.

Recommended Posts

I'm trying to compile Terra-Engine samples, I added all the paths for its different directories (library). However, when trying to edit `billboards_simple` sample or others too, code completion hangs the entire IDE turning it useless, e.g. if I write `Length(` and IDE tries to automatically show the tooltip description/suggestion, the IDE also hangs.

 

I uninstalled all other IDE extensions/plugins, restarted and the same error happens.

 

Well it responds after a very, very, veeeeery long time, but without even showing code completion nor suggestion tooltips. Very long that it is better to kill process and restart.

 

Steps to reproduce:

Open any Terra-Engine sample and edit it (previously added all engine paths to library).

After pressing `ctrl+space`, `ctrl+shift+space` or `automatic tooltip description/suggestion after writing "(" on any procedure call` or `ctrl+click` it shows and cursor shows a busy icon, if I click anywhere else, the IDE hangs.

 

Work around: Do not click and instead press ESC (right away) and continue.

 

I suppose this is because the engine is very large and that's why the delay is very long that it "hangs" it.

image.png.a968aa6e2de20fcf2194c9b08db2ff60.png

 

I set Code Insight delay from None to Slow, and it gets worse, it doesn't even allow to ESCape.

 

Hitting Esc key each time '(' character is written is annoying, so I had to disable on (Options | Editor Options | Code Insight | Code parameters) in order to ignore '(' parameters tooltip suggestion.

 

image.png.98c85ec113a8f6bc0b8afe348e579466.png

However, parameters popup on mouse hover works normally.

 

I don't know if it is my current installation, or Delphi version, so I just mention here, maybe is a bug already reported, maybe even fixed.

 

Does it happened to you? On other/your projects?

 

 

BTW: Delphi version is 10.2 Update 3 25.0.31059.323

 

 

Edited by vhanla

Share this post


Link to post

Thank you for mentioning a really big open-source project that I can test on my Delphi 10.2.3 CE. Yes, the same thing happens to me. (IDE FixPack installed.) It would be nice if Delphi developers tested their product on this project.  (6 minutes to rebuild the project is a record for me.)

 

At yesterday's webinar "See What’s Coming in 10.3 Rio", they mentioned that the code completion in the new C++Builder will work in a separate thread and not block the editor. I hope they can later implement this function in Delphi too.

Edited by Kryvich

Share this post


Link to post

First I recommend you to install Andy's IDE FixPack. It will be much better.

 

And I tried to compile in 10 Seattle out of curiosity but:

- particles_simple sample does not compile because TERRA_SpriteManager unit is missing.

- linetest sample does not compile because TERRA_Scene unit is missing.

- camera_shake finally compiles....

 

And there is soooo much noise at compilation.... a lot of hints and warnings. Someone must clean this before take this project seriously.

And 167 kloc in 127 seconds for camera_shake sample (win32)?

I have a project with 243 kloc that compiles in 10 seconds on the same machine. I'm not surprised that CodeInsight is so slow.

 

PS. In 10 Seattle CodeInsight is instant after a build (FixPack installed).

Edited by Cristian Peța

Share this post


Link to post
47 minutes ago, Kryvich said:

 (6 minutes to rebuild the project is a record for me.)

Which project have you compiled in 10.2.3?

 

I have an error in TERRA_OGG:

function stb_vorbis_get_samples_short_interleaved(f:pvorb; channels:integer; 
         buffer:array of SmallInt; num_shorts:integer):integer;
var
   outputs: TOutput;
   len,n,z,k,kk,ch:integer;     
   buf:array of SmallInt;    
begin
   len := num_shorts div channels;
   n:=0;
   kk:=0;
   z := f.channels;
   if z>channels then z:=channels;
   buf:=@buffer[kk]; <---[dcc32 Error] TERRA_OGG.pas(5391): E2010 Incompatible types: 'Dynamic array' and 'Pointer'

 

Edited by Cristian Peța

Share this post


Link to post

@Cristian Peța I've change it like this:

Pointer(buf):=@buffer[kk];

And yes, too much of hints and warnings. But as a test sample for IDE developers is great.

Edited by Kryvich

Share this post


Link to post
1 hour ago, Cristian Peța said:

And there is soooo much noise at compilation.... a lot of hints and warnings. Someone must clean this before take this project seriously.

In my humble opinion, perfect (no hints, no warnings) projects can not be taken seriously, especially for testing. For testing you need (near) worst case projects like this. Sometimes it seems perfect projects is all the EMBT people work on, they seem to only work on those demos none of which exceed the 500 loc mark.

Share this post


Link to post
2 hours ago, Kryvich said:

... Delphi 10.2.3 CE. Yes, the same thing happens to me. (IDE FixPack installed.)

I don't see any issues after I build camera_shake in 10.2.3 with IDE FixPack. Code completion and others are instant.

BTW build time is the same as in 10 Seattle.

Share this post


Link to post

@Cristian Peța After a complete rebuild, hints began to appear lightning fast. I suppose, until the project was fully compiled, IDE ran the background compiler each time it tried to show a hint. That is why the freezes occurred. This can be solved by putting the code completion into a separate thread.

Share this post


Link to post

Very good library to test the CodeInsight and ErrorInsight features.

Share this post


Link to post
12 hours ago, Kryvich said:

Very good library to test the CodeInsight and ErrorInsight features.

Not with such massive unit dependency cycle issues, which are known to cripple the IDE.

Share this post


Link to post

@Bill Meyer That's the whole point: if Embarcadero can get the IDE to work on a such project, then CodeInsight will work flawlessly on projects with a well-designed architecture.

Share this post


Link to post
1 minute ago, Kryvich said:

@Bill Meyer That's the whole point: if Embarcadero can get the IDE to work on a such project, then CodeInsight will work flawlessly on projects with a well-designed architecture.

And after all these years, the chances seem slim.

 

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

×