Jump to content
WnSoft Forums

Windows graphical limitations


think(box)

Recommended Posts

The Windows GDI (Graphics Device Interface) has graphical limitations that most show developers will never encounter. When you do exceed these limits even Windows can crash, not just PTE. You would think Windows could be more graceful at handling limits, but of course the application developer can work around almost any Microsoft feature limitation. Further, the show developer can work around any combined limitation of Windows and show software.

This topic is aimed at providing reference information for advanced show developers who push the limits but want to make sure that anyone viewing their show has no problems. All PTE users are very grateful to Wnsoft for providing such world-leading show software and this forum. To begin, here are Igor's words from the v4.10 beta topic series scratching the surface of understanding for this issue:

Thanks, Bill!

There is a limitation in Windows for creating too much graphical objects (simultaneously at one moment). No problem with usual slides (even 100'000 of large pictures), because they are showing one after another.

It's quite another matter when you add many small pictures (as objects) into *one* slide. And they all will be displayed together. In your presentation, you've sent me, there are more than 500 small pictures per slide. Each picture (small or very large) requires 2 GDI resources of Windows. So 500 pictures will require 1000 GDI resources. There is no problem when it added 100-200 and maybe 400 sub-pictures in the Visual editor of objects. And greater number may cause the problem.

So I see two possible tricks how to solve this limitation.

1) Optimization (in the memory storage) for repeated picture-objects;

2) Or algorithm which will storages many small pictures into one large bitmap (as mosaic). As I said earlier Windows has an interesting mechanism and 100x100 or 1600x1200 picture requires equal number of GDI resources (2 GDI per bitmap).

But both variants require many changes and even not one week of work, unfortunately.

Here is my response, along with a request for clarification:

I see what you are saying for how to make P2E work with Windows in this case. Both techniques combine graphical elements or element references within PTE or P2E so that the Windows GDI is given less objects to display. Since the changes to support high per-slide object count are extensive, could you provide some guidelines to permit advanced showmaking without surprises across Windows versions? Here are some questions. You may know of other considerations to add.

  • How does the object limit differ across all versions of Windows?
  • Is the GDI object limit a system-wide limit, such that other app's consume from the same pool?
  • Approximately how much do we have for per-slide object count limits at two GDI objects per graphic image?
  • Does P2E have *any* residual objects from previous slides? (The now fixed memory leak was important here)
  • Does any main slide photo file format or display method require more than two GDI objects?
  • Can the background photo require more than two GDI objects?
  • How many objects does the P2E navigation bar require?
  • How many objects does the P2E help box require?
  • In the object editor does any added object (photo, link, button, text) require more than two GDI objects?
  • Does a greater number of GDI objects in a given slide cause greater CPU demand to display?
  • Does a greater number of GDI objects in a given slide cause greater CPU demand in fades?

If we understand how this works we can make successful shows that challenge, but stay within, the Windows and show software combined limitations. Thank you for the insight!

Link to comment
Share on other sites

Really 99,99% of users needn't never disquiet about this limitation!

All things have own limitations. For example, Windows also may fall if you open 200 or 300 applications. Or if we add high-resolution (5000x3000) pictures it will vastly slow down the show of slides :)

About GDI resources (graphical resources - this is Microsoft's technology).

Windows NT, 2000 or XP have in 10 times more GDI resources for applications than under Windows 95,98 or Me.

You can watch this limit ("Canvas doesn't allow drawing") under Windows 98 when run many (10-20) applications with complex interface.

Each picture, or button, or label, or checkbox takes 1 or 2 GDI resources.

So you can calculate how many GDI resources take one *visible* window of some program :)

One photo or background picture (even very large!) takes ONLY 1 GDI resource.

Usual application uses 150..350 GDI resources.

For example MS Word - 140, Media Player 8 - 343, Photoshop 7 - 242.

Concerning PTE.

PicturesToExe uses 192 GDI resources.

And I'm glad to say that usual produced presentation takes only 60-70 GDI resources during all time of show! And it can be 100 Mb show with long mp3 music, and 10000 of slides and 10-20 objects per *each* slide.

So please forgive about some limitations. It doesn't matter.

p.s. of course, we free objects and main picture after show of a slide, because they are not necessary more. Every slide will be prepared dinamically when it's necessary.

Link to comment
Share on other sites

Thanks for the limits information Igor! It is true that pushing per-slide graphical object counts to high values is not a mainstream showmaking method, but for anyone who tries it the help is here. I spent many hours designing and building a show format that (accidentally) exceeded the Win95-98-ME limit. Had I known the limits I would have worked within them. I have since figured out how. The loss could have been worse had I built the show in WinXP since it would have worked fine while I made the show, until later when I gave it to someone with WinME or earlier.

This is all to say that this documentation is worth making, probably more than we all know.

Based upon your reply I will use a limit of about 400 GDI resources maximum per slide in order to have all-Windows compatibility. Translated, this means about 200 maximum graphic images placed within the object editor for a given slide. This is a reasonable limit, however from what you say even this value may fail depending upon how graphically complex the other app windows are on a given Win95-98-ME system. Obviously, lower counts have lower risk.

When people can use scripting or macros to generate the .PTE show file, the limits that you think are high will be easily exceeded. Case in point!

Link to comment
Share on other sites

Aha! This explains why, when I tried to create a super-large (over 400 different "objects") "dark-table" in Adjustor, Excel crashed on me! :D

Link to comment
Share on other sites

  • 2 weeks later...

Want to KNOW when your system is headed for a crash in time to prevent it? Another great Russian software developer also named Igor can help you!

Why has Microsoft never provided a feature to alert a user that their house of cards operating system software is headed for disaster?

After having the GDI Resource problem from this topic thread I researched, purchased and installed software called TaskInfo2003, in order to get full info about Windows status, tasks and threads and to be able to control them. One of the features of TaskInfo2003 is an alerts alarm system. I just received the first alerts alarm in a small, always on top window that appears in lower-right screen corner until the alert condition goes away or I close it. The alert condition encountered is none other than the subject of this topic thread, a Windows graphical limitation heading for failure. Here is the alert content:

Low GDI Resources

Alert Level 30%

Free GDI Resources 26%

Alerts Configuration Help

This happened after about a tenth window was opened, supporting Igor's claim that there is a system-wide limit for GDI Resources that can bring the system down if you run out (proven :huh: ). There are other Alerts for Low Resources (GDI Free %, USER Free %, GDI Objects, USER Objects and Windows total), Too Many Win32 Handles, and Low Virtual Memory. The help info says that all information, controls and alerts are Windows version context sensitive (for Win98SE I get the items mentioned). The software supports all versions of Windows.

In the main app window you get histogram displays of all system activity and resources, including network and Internet activity. Everything is configurable to display what you want and in the way you prefer. And there are several quick access tools to control your system and its resources.

This is really great because I can find out that Windows is about to crash and keep it from happening in many cases. And there is an on-going indicator to help as well - an animated taskbar tray icon that displays swap file and RAM use in micro bar chart form in one third of the icon and a CPU utilization histogram in the other 2/3 of the icon (you can change displayed info).

TaskInfo2003 was written by another great Russian, Igor Arsenin, who may even be known to Igor Kokarev, the PTE founder we all know so well, through professional organizations. Igor Arsenin graduated from Novosibirsk State University (Russia) quite some time ago and started Iarsn Company (Igor Arsenin) from his own web site. It is now a big business.

If you want to read about TaskInfo2003 and/or Igor Arsenin, click this link:

TaskInfo2003 information (www.iarsn.com)

Link to comment
Share on other sites

You are welcome!

I would like to add a note about P2E shows and TaskInfo2003 or other system utilities:

P2E shows on older, slower systems are sensitive to the performance demands of other applications. TaskInfo2003, like other system utilities operates at a higher priority than normal applications. P2E shows are normal priority applications.

Hence it may be best to disable monitoring tools like TaskInfo2003 (and any others that monitor your system constantly) when viewing P2E shows or any video intensive applications, like a movie player.

At all other times, including when developing P2E shows in PTE, it is best to keep monitoring tools like TaskInfo2003 operating and monitoring for problems.

Use your judgement on this. For your system's needs try watching a performance intensive P2E show and a movie with and without monitoring tools enabled. If you find there is a difference in viewing quality then considering the suggestions in this note.

Link to comment
Share on other sites

Bill,

This is very good advice - it's something I've been stressing often in reply to people with problems in the smooth operation of PTE.

It also applies to background running of automatic email gathering software, virus software, fax software, etc., particularly on resource-challenged pc's.

I find with my MS system monitor, though, that it uses very little processor time (approx 2 or 3%), and it can be set to scan only once every 3 or 4 seconds if desired. Of course it's probably not covering as many parameters as Task Info.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...