Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4579952
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T20:42:54+00:00 2026-05-21T20:42:54+00:00

This question is specifically for .net CF, but it should apply to any slow,

  • 0

This question is specifically for .net CF, but it should apply to any slow, archaic system.

I’ve written a custom ListPanel type object that holds custom ListItem type objects. Each ListItem contains 0-5 different graphics and 1-4 different sets of text (each set of text has a different font or color). Each item is also between 480×14-480×800 in size (WxH)

The ListPanel object has a Buffer of type Bitmap which is the size of the phone’s screen (usually 480×800) that is used for Double Buffering. Each ListItem also has a Buffer that is the size of the item (this is because the ListItems rarely change once they are created). The ListPanel sends its Buffer’s Graphics object to all of its ListItems, and each ListItem uses it to draw its Buffer Bitmap. After all the visible items have drawn themselves with the Graphics Object, the panel’s Buffer is drawn to the screen

The average list contains 10-27 items.

I have a few questions regarding this buffer caching pattern.
First, is it over kill to save this many buffers? In a list with 26 objects, there are at least 28 bitmaps in memory, which on the .net CF is a great amount of space. If this is over kill, what would be a better method for rendering the screen (taking into account that the worst case ListItem will draw 6 graphics and 4 sets of text with different fonts).

Also, there are a few reoccuring graphics (stored either as an embedded resource or copied locally to the the output directory and read in as a file) and I want to know if it’s better to save those images in memory or read/close them for every use?

Finally, (assuming the items above) when should I render the ListItem’s Buffer? Should I render it in the item’s ctor or the first time the item enters the display? Rendering the Buffer in the ctor will cause a delay when the page is being created but will be smoother when the user scrolls. Rendering on first time display can be make for choppy scrolling, but the page loads faster and some items that aren’t seen don’t need to be loaded into memory

Any guidance would be excellent

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-21T20:42:55+00:00Added an answer on May 21, 2026 at 8:42 pm

    I think you should take a look on the accepted answer for this SO question. One small fragment that applies to your case for example says: “Avoid doing a lot of work in a Form’s ctor – off load it for lazy load or in a background thread”

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

(This question specifically in C#, but applies generally to .NET) I have a largish
This question is specifically related to overriding the equals() method for objects with a
This question would probably apply equally as well to other languages with C-like multi-line
(This question is over 6 years old and probably no longer has any relevance.)
This question is kind of an add-on to this question In C#, a switch
This question and answer shows how to send a file as a byte array
This question comes on the heels of the question asked here . The email
This question is a follow up to my previous question about getting the HTML
This question is about removing sequences from an array, not duplicates in the strict
This question is the other side of the question asking, How do I calculate

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.