No description
Find a file
Mark Kim 7727b995c5 Minimize CPU/energy usage
We received a report of Tux Paint generating too much heat on a MacBook
Pro (15-inch, 2017 running macOS Mojave 10.14.6).  The bug report
included a screenshot of Activity Monitor's Energy Tab showing Tux Paint
having an Enegy Impact of "23.4" and Avg Energy Impact of "3.94".

Although we weren't able to reproduce the same conditions exactly, we
did observe Tux Paint having an Energy Impact level of around ~15 even
when idle on both macOS Yosemite 10.10.5 and Big Sur 11.1.  Energy
Impact leve of ~25 when in use was not uncommon, and spiked to ~55.  The
MacBook Air used for testing (11-inch, Early 2014) did not become hot
"to the touch" as was originally reported, but it did become noticibly
warm.

An investigation found the cause to be in two places:

1. Tux Paint's main loop runs fairly tightly, yielding only a minimum
   time slice to the kernel after each iteration using SDL_Delay(1)
   (1 millisecond).  This has been increasd to 10 millisecond to give
   more slice back to the kernel.  Increasing the 1ms yield to 10ms
   should be only minimally noticible as Tux Paint is primarily a human
   interaction software and human eyes perceive responses < ~100ms as
   immediate, giving us over 90ms to accomplish what we need to after
   each iteration as opposed to the previous 99ms.

2. Enabling SDL's timer subsystem (SDL_INIT_TIMER), even when not used
   actively, has a high impact on the energy impact.  Some testing
   showed the timer subsystem, though supposedly a part of SDL_Delay() and
   SDL_GetTicks(), is not required to be enabled to use those functions.
   It does require to be enabled, however, to use SDL_AddTimer() which
   is only used in Tux Paint when scrolling.  Tux Paint therefore has
   been modified to enable the timer subsystem only when scrolling
   starts and disable it when not scrolling.

The solution to #2 is not an ideal approach but it did provide a quick
solution to the user having the problem.  Issue #2 should get resolved
naturally when we upgrade to SDL2 where the timer subsystem does not
appear to have the energy impact issue.
2021-01-16 21:01:21 -05:00
custom Move custom/macos* files to macos/* 2021-01-11 18:16:22 -05:00
data Larger OSK on larger windows; larger OSK font 2020-08-25 22:00:43 -07:00
docs Galician tuxpaint update 2021-01-15 2021-01-15 09:43:03 -08:00
fonts/locale Skipping locale-specific fonts, unless we're in that locale. 2009-06-01 04:02:40 +00:00
haiku Adding the tuxpaint.rdef file, this contains the tuxpaint icon for Haiku 2010-06-02 15:44:15 +00:00
hildon Updated version #. 2007-11-27 18:04:20 +00:00
im Comment error fixed. 2009-05-31 15:49:28 +00:00
macos Move custom/macos* files to macos/* 2021-01-11 18:16:22 -05:00
maemo/debian DESTDIR is the standard name, not PKG_ROOT 2008-04-26 19:38:17 +00:00
magic Adding icon for Clone tool 2021-01-11 09:34:21 -08:00
obj Ignoring gperf-generated parse.c and interim parse_step1.c. 2009-11-20 22:43:02 +00:00
osk More indentation! 2019-04-13 12:23:47 -07:00
src Minimize CPU/energy usage 2021-01-16 21:01:21 -05:00
stamps/cartoon/tux Optimised PNG files using TruePNG and PNGZopfli. 2014-06-29 11:08:36 +00:00
starters Elefant, fish-icon and frame_hearts SVGs touched the edges and got ugly strips at some Tux Paint's window sizes. Remade them in inkscape and put a margin of 3 units on each side. 2020-10-22 03:14:26 +02:00
templates Adding a number of example templates. 2014-01-04 09:15:35 +00:00
visualc Moved sdl docs. 2007-08-11 18:01:14 +00:00
win32 Bump ver to 0.9.26; Expanded release steps 2020-12-27 17:45:13 -08:00
.cvsignore Ignoring generated-thumbnails directories in CVS. 2010-04-27 22:07:26 +00:00
.gitignore Ignoring src/po/POTFILES.in 2019-09-24 08:42:00 -07:00
dummy.c indent dummy.c 2017-10-15 11:32:16 -07:00
findbad things belonging in .bss that may end up in .data instead 2009-11-23 03:00:05 +00:00
Makefile Move custom/macos* files to macos/* 2021-01-11 18:16:22 -05:00
README.txt A more useful root dir README 2017-11-12 11:00:07 -08:00
tuxpaint.spec Bump ver to 0.9.26; Expanded release steps 2020-12-27 17:45:13 -08:00

Tux Paint

Tux Paint is a free, award-winning drawing program for children
ages 3 to 12.  It combines an easy-to-use interface, fun sound effects,
and an encouraging cartoon mascot who guides children as they use
the program.

Kids are presented with a blank canvas and a variety of drawing tools
to help them be creative.  Along with paintbrush, shapes and text,
Tux Paint includes a "stamp" feature to add pre-drawn or photographic
imagery to pictures, and a set of "magic tools" that provide filter effects
(like blur, tint and waves) and interesting drawing tools (like train tracks,
bubbles and grass).

Tux Paint includes a collection of "starter" images, both coloring-book style
and photo-realistic, and a large collections of stamps are available
as a separate download. Additional content can be added by parents and
teachers, or downloaded from 3rd parties.


Please see the full documentation located in the "docs" directory.

$Id$