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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T23:00:58+00:00 2026-05-25T23:00:58+00:00

My program is a visualizer that is constantly updating the display. I am trying

  • 0

My program is a visualizer that is constantly updating the display. I am trying to optimize it to increase the framerate, and my largest cost is gtk._gtk.main:

   ncalls  tottime  percall  cumtime  percall filename:lineno(function)
        1    9.159    9.159   45.476   45.476 {gtk._gtk.main}
      868    8.146    0.009    9.884    0.011 xyz.py:291(gfx_transform_queue)
      868    7.705    0.009   12.657    0.015 xyz.py:322(gfx_draw_queue)
      868    3.886    0.004    7.755    0.009 xyz.py:240(gfx_queue_atoms)
   868000    2.638    0.000    4.952    0.000 xyz.py:365(gfx_draw_circle)
  7027010    2.111    0.000    2.111    0.000 xyz.py:314(cmp_queue)
  1736000    2.015    0.000    2.015    0.000 {method 'draw_arc' of 'gtk.gdk.Drawable' objects}
   869844    1.728    0.000    1.728    0.000 {numpy.core._dotblas.dot}
      868    1.635    0.002    3.746    0.004 {sorted}
   869872    1.261    0.000    1.261    0.000 {numpy.core.multiarray.array}
      933    1.100    0.001    1.100    0.001 {method 'get_pointer' of 'gtk.gdk.Window' objects}

Is this reasonable behavior, or is it possible I am doing something wrong to make gtk.main suck up a lot of time?

  • 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-25T23:00:59+00:00Added an answer on May 25, 2026 at 11:00 pm

    You’re interpreting the profiling data wrong.
    gtk.main() is really just running your program as the user interacts with it. What you’re seeing is that it takes time to run your program, not gtk.main() itself.

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

Sidebar

Related Questions

My program is like this ( main.c ): #include <stdlib.h> #include <stdio.h> void main(){
I'm implementing a c# program that should automatize a Mono-alphabetic substitution cipher. The functionality
For about a year I have been thinking about writing a program that writes
I have one 'main' thread that creates an array of objects of class SlowData
I am having a little problem. I wrote a program that extracts a set
I was trying to create a visualizer for IDictionary or ICollection Then like the
I'm developing a Qt program that contains an OpenStreetMap application as a HTML page
I'm trying to create a program which will visualize different sorting algorithms by drawing
Program A, is a c program that endlessly, receives input in stdin, process it
Is there a program that will print a nicely formatted tree from XML data?

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.