Submitted by Armando on 2016/12/14 12:02
Mentioning this only because it tends to become an issue with the possibility of opening many panes, grids, panes in tabs, etc.

GDI Objects tend to really accumulate and never get released, and this slows down IQ over time. Passed 5000 (and this is a lot, by any standard, I think), IQ starts to get pretty sluggish.

Then, even if I close all panes, grids and tabs, GDI will remain at more than 3500 and never gets below, for some reason. Seems to be related to icons (see below**). By contrast, if IQ is freshly loaded, with one tab (and a few unopen tabs) it takes 1980 GDI.

So to get rid of GDI objects and regain responsiveness, one needs to close IQ and reopen it.
That might explain why, sometimes, IQ gets less responsive over time.


** I noticed that if I remove all icons from the icon folder, IQ takes less resources, and closing all grids will effectively bring it close to its fresh GDI objects usage state, as expected (and not remain at a super high number like 3500). So it seems that icons are never "released" when a grids are closed. In any case I wonder if all icons really need to be loaded all the time and if IQ could load only the needed icons on a per grid basis and flush them when not used. It also seems that each new grid/pane (maybe even more so) consume a pretty high GDI Objects.

Comments

Perhaps this can help:
 
For each grid, and you may have many open, there are GDI objects used for items, bitmaps and fonts:
  • Lots of icons will raise the count of object
  • Each item in the grid consumes objects, So lots of items with lots of fonts attributes (includes conditional formats) will count
As for the acceptable level, it all depends. My run-of-mill Explorer consumes over 1000 and even something as simple as Task Manager consumes nearly 1000
 
Loading only required icons is one possibility, but may slow dow things as content needs to be scanned to load used ones. I'll look into it
I'm also considering an Unload command to grids. Sometimes a grid is loaded by mistakes and unloading would clear things up
As for leaks, I checked and opening / closing grids does not show there are any leaks, numbers going up and down the same amount. For example opening a complex setup of 1 grid with 2 grids and the Calendar in panes raised the GDI object count from 1685 to 2128. Closing it brought it back to 1685
 
A useful tool that could be added to provide the list of used and unused icons in an IQ Base. Perhaps it could help clean-up unused icons
 
Pierre_Admin
IQ Designer
 

Armando

2016/12/14 15:56

In reply to by Pierre_Admin

Thanks!
(Since we privately talked about the matter, I won't repeat everything. I'll just add that for my DB, the GDI total  never comes back to its early total.)
 
-
IQ geek
Windows 8.1
CPU: Intel i5 2.6ghz

Pierre_Admin

2016/12/14 16:46

In reply to by Armando

Hi !
 
I checked out your scrambled IQBase and it seems that the Properties pane take a wopping 1000 GDI handles. Of course, there are 700 fields in all. But looking at it in more details, the field number as such is not the issue. However, it seems that each drop-down list (non-autolist type) takes up 6 GDI object. Since you have many such fields, that these are also shown in numerous forms, it adds up.
 
I'll see what can be done...
 
Pierre_Admin
IQ Designer
 

Pierre_Admin

2016/12/14 17:19

In reply to by Pierre_Admin

In v88d, I only load the dropdown editor when the cell receives focus. This saves a huge amount of GDI for an IQBase like your !
 
 
Pierre_Admin
IQ Designer
 

Armando

2016/12/14 23:14

In reply to by Pierre_Admin

[quote=Pierre_Admin]
In v88d, I only load the dropdown editor when the cell receives focus. This saves a huge amount of GDI for an IQBase like your !
 
 
Pierre_Admin
IQ Designer
 
[/quote]
 
Thanks a lot Pierre! Hopefully others will benefit from those technological improvements! 
-
IQ geek
Windows 8.1
CPU: Intel i5 2.6ghz