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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T01:01:37+00:00 2026-05-28T01:01:37+00:00

I want to display a 139 cols * 121 rows image map. (The image

  • 0

I want to display a 139 cols * 121 rows image map.

(The image size is 32*32 px)

I use a gtk.Iconview with a gtk.ListStore that I fill with gtk.gdk.Pixbuf, like this :

(the two dimensional graph list contains objects that contain the images path to display)

pixbuf_passage = gtk.gdk.pixbuf_new_from_xpm_data(xpmdata)
for row in graph :
    for col in row :
        pixbuf = gtk.gdk.pixbuf_new_from_file(col.img_base)

        if col.passage :
            pixbuf_passage.composite(pixbuf, 0, 0, pixbuf_passage.props.width, pixbuf_passage.props.height, 0, 0, 1.0, 1.0, gtk.gdk.INTERP_BILINEAR, 255)

        self.grid.listStore.append([pixbuf, tooltip])

My problem is that the image loading time can be quite long, depending on the computer’s configuration :

  • ~20s for a Intel Core i7 with 4Gb RAM (which is acceptable)
  • ~160s for a AMD X2 4200+ with 4Gb RAM (which is too long)

Is there any way to speed up the image loading ?
Perhaps the use of a gtk.Iconview isn’t optimal here ?

Thanks

  • 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-28T01:01:37+00:00Added an answer on May 28, 2026 at 1:01 am

    The PyGTK FAQ has a few tips for this. The most important seems to be that you should freeze the treeview/iconview and unset its model temporarily while adding a lot of entries.

    treeview.freeze_child_notify()
    treeview.set_model(None)
    
    # Add rows to the model
    # ...
    
    treeview.set_model(model)
    treeview.thaw_child_notify()
    

    The trick using g_idle_add is also useful to add more responsiveness to the UI.

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

Sidebar

Related Questions

I want to display a thumbnail image in a cell of tableViewController , this
I want to display an image within a scroll area. The view port of
I want display images in gallery view it want to focus to paticular image
I want to display a subtitle text, running over the top of an image,
I want to display the result in listview that i written in the texbox
I want to display a map in a MFC application (Visual Studo 2008 with
I want to display a custom image while dragging an object in a drag&drop
I want display an image instead of downloading it. I have image in my
I have a simple quiz application and I want display a nice timer /
I want to display the TIME field from my mysql table on my website,

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.