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 9188373
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T19:59:24+00:00 2026-06-17T19:59:24+00:00

This question is very open and probably, the answer to this question will depend

  • 0

This question is very open and probably, the answer to this question will depend on the system, but say in average which is the best way to show a large matrix (say 128 elements) of different states?

  • Create one control for each cell and let GUI library deal with all events and stuff (In Windows 128 HWND:s)
  • Draw the entire matrix by using lower-level graphics primitives

Is there a difference in memory/CPU performance depending on choice? The number of states in my application is 4 for each cell so they need 2 bits each to represent their state. Each cell will be represented by an image related to the state.

  • 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-06-17T19:59:26+00:00Added an answer on June 17, 2026 at 7:59 pm

    Sure there is a difference. I will try to illustrate this and also the assumptions this is based on.

    1. Cost of a control = memory for control + event handlers for control + references to control + one extra control in event pipeline

    2. Benefit of “tight” control per cell mapping. Conceptually clean, simple code, easiest to think about.

    3. Cost of tight mapping : multiply the cost per control by the number of cells.

    The alternative I’m about to suggest assumes that the cost delta between tight mapping and a loose “one ring” mapping is important.

    alternative : just add one control that is registered for events only within the bounds of the whole matrix view you present, has a piece of code to determine the pointer position and what cell that corresponds to, and then updates only that cell depending on the user interaction there.

    The advantages of this are you get the marginal cost of only one extra control but the benefit of handling interactions for the entire matrix. The marginal benefit or this control is much higher than for a single tight control. Aldo, the implementation cost is small as it is a common pattern and not too difficult.

    Good luck!

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

Sidebar

Related Questions

Sorry if this question is very easy, but I can't find the answer anywhere.
This is probably a very common question, but I was unable to find an
This is probably a hard question to answer, considering it's very hard to demonstrate
This is a very simple, probably too simple question but I'm afraid my limited
guys I know this question is very basic but I've met in few publications
I'm hoping this question has a very simple answer. I can think of ways
Sorry about the title to this question, it's not very clear but wasn't sure
So, this is a seemingly simple question, but I'm apparently very very dull. I
This question is very similar to https://stackoverflow.com/questions/6839516/outlook-2010-reopen-messages which was closed as not being a
This is probably a very naive Emacs question - I'm new to it. When

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.