Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Database & SysAdmin
  3. System Admin
  4. Windows XP Process information.

Windows XP Process information.

Scheduled Pinned Locked Moved System Admin
graphicshelpquestioncsharpperformance
3 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • R Offline
    R Offline
    RajeshGuptha
    wrote on last edited by
    #1

    Hi All, Im developing a Windows application in C# running on XP/512MB RAM/40GB HD. My application uses complex graphics and hence is pretty heavy! It has loads of images to be displayed and all of those are loaded from resource files. Initially i was skeptical whether i would face any problems in loading these images. But fortunately i did not face any problem in that regard. But when i started building the application, because of its highly Graphical Interface, i started getting a WIN32 Exception which implies that the number of handles created by the application exceeds the limit. After having a look at the Task Manager, here goes the statistics, My applications uses 250MB of memory, 240 handles created, 10,000 User Objects created, 7 Threads running, 62 GDI Objects created. After the application creates 10,000 user objects, the exception is thrown by the framework. Can anybody help me in throwin some light whether XP has any restrictions in creating unser objects. And if so, then what is the alternative to the problem? Meaning, how to restrict the creation of user Objects. Or if i double the RAM, will the number go up?? Or any other alternative!! Thanks in Advance! Rajesh

    D M 2 Replies Last reply
    0
    • R RajeshGuptha

      Hi All, Im developing a Windows application in C# running on XP/512MB RAM/40GB HD. My application uses complex graphics and hence is pretty heavy! It has loads of images to be displayed and all of those are loaded from resource files. Initially i was skeptical whether i would face any problems in loading these images. But fortunately i did not face any problem in that regard. But when i started building the application, because of its highly Graphical Interface, i started getting a WIN32 Exception which implies that the number of handles created by the application exceeds the limit. After having a look at the Task Manager, here goes the statistics, My applications uses 250MB of memory, 240 handles created, 10,000 User Objects created, 7 Threads running, 62 GDI Objects created. After the application creates 10,000 user objects, the exception is thrown by the framework. Can anybody help me in throwin some light whether XP has any restrictions in creating unser objects. And if so, then what is the alternative to the problem? Meaning, how to restrict the creation of user Objects. Or if i double the RAM, will the number go up?? Or any other alternative!! Thanks in Advance! Rajesh

      D Offline
      D Offline
      Dave Kreskowiak
      wrote on last edited by
      #2

      10,000 User objects?!?! What the (explitive deleted) are you doing to cause this? 3D modelling apps don't generate that kinds of load! A count this high is very unusual. WOW! Your app is most assuredly leaking something somewhere. Or, you're preloading TONS of stuff you shouldn't have to. There is no way to increase this limit. I don't care how much RAM you shove in the machine, you're app definitely has problems. You might want to step through your code with TaskManager or Performance Monitor open to see where this is comming from. You're probably not calling .Dispose() on an object that you repeatedly create, but never properly destroy when you're done with it. -- modified at 13:00 Monday 18th September, 2006

      Dave Kreskowiak Microsoft MVP - Visual Basic

      1 Reply Last reply
      0
      • R RajeshGuptha

        Hi All, Im developing a Windows application in C# running on XP/512MB RAM/40GB HD. My application uses complex graphics and hence is pretty heavy! It has loads of images to be displayed and all of those are loaded from resource files. Initially i was skeptical whether i would face any problems in loading these images. But fortunately i did not face any problem in that regard. But when i started building the application, because of its highly Graphical Interface, i started getting a WIN32 Exception which implies that the number of handles created by the application exceeds the limit. After having a look at the Task Manager, here goes the statistics, My applications uses 250MB of memory, 240 handles created, 10,000 User Objects created, 7 Threads running, 62 GDI Objects created. After the application creates 10,000 user objects, the exception is thrown by the framework. Can anybody help me in throwin some light whether XP has any restrictions in creating unser objects. And if so, then what is the alternative to the problem? Meaning, how to restrict the creation of user Objects. Or if i double the RAM, will the number go up?? Or any other alternative!! Thanks in Advance! Rajesh

        M Offline
        M Offline
        Mike Dimmick
        wrote on last edited by
        #3

        Each .NET Windows Forms control is a Windows window, which is a user object. Any application which uses a large number of controls is likely to suffer from problems. I suspect you're using a lot of PictureBoxes or similar. The solution unfortunately is to manage the drawing surface of a control directly. That is, defining your own control that derives from Control, and overriding its OnPaint method to draw its surface, and any other methods needed to allow the user to interact with the control. You should normally perform all painting in the OnPaint method; from other methods you should update whatever data structures describe the current display and call Invalidate to tell Windows that the control needs repainting; Windows will then call OnPaint when the application is idle. For better performance, you normally Invalidate only the rectangle (or region if a shaped region) that actually needs to be redrawn. In the OnPaint method, use the PaintEventArgs ClipRectangle member, or the Graphics object's IsVisible method, to work out what needs to be redrawn. Reducing the amount of drawing done will normally speed up the drawing and give a more responsive application.

        Stability. What an interesting concept. -- Chris Maunder

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups