[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[pygame] Limited FPS?
- To: pygame-users@xxxxxxxx
- Subject: [pygame] Limited FPS?
- From: "Chris Smith" <maximinus@xxxxxxxxx>
- Date: Wed, 19 Nov 2008 21:05:21 +0800
- Delivered-to: archiver@xxxxxxxx
- Delivered-to: pygame-users-outgoing@xxxxxxxx
- Delivered-to: pygame-users@xxxxxxxx
- Delivery-date: Wed, 19 Nov 2008 08:05:29 -0500
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:mime-version:content-type; bh=oMq/4LwTe25J7aJcQ8aBCaMB92GnEi1Lpa5bfbM3OWU=; b=O2xNYjaoVvQ2bgbRjYSMG+ylPke0B6Q3TDkvALjhclc5AbhEivhGlGCGZqFp4DsIlI cVASwqC/qqTCadTNc5Rvc7dKM9ho3LQyR9g4G8PyG9wsLm/AdoRUG0s54Ih8CbRuZsZO aTderxciyaQ3PCzkZnVdCkl0R+LRzyQ7r6FwI=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:mime-version:content-type; b=ZsG+6m8lKzVVG+Psifs5pn5Z9AAreBP7D7ttWCOwr1p+SYrH/YdjeOQ2efPZZDnflm r9IXyXb7sKoHnu8B6ZUX3T2YTUUdhf0b8hnEaKqIvzorfL6b4QFIQm2fUlFMO0NIhrgf GQTrXreTRN3C8+dO3wPK7Lkj1N63QBOvz+lSU=
- Reply-to: pygame-users@xxxxxxxx
- Sender: owner-pygame-users@xxxxxxxx
On this machine (Ubuntu 8.04, PyGame 1.7.1), pygame flip() is very slow.
A little demo I set-up and profiled showed that for 610 frames of animation - taking 21.8 seconds - pygame.flip() was taking over 9 seconds of that! Now I know that flip() has to wait for the monitor raster to get to the top of the screen, but my monitor is much more than 30 FPS! I can also understand it being a software blit, but the same number of fill() routines to clear the screen - which I have to assume moves the same amount of data - only takes 1.8s.
As I understand it PyGame is a thin layer over SDL, so is this something in SDL itself? Or am I doing something wrong?
-- Chris