Ticket #3778 (new enhancement)
Opened 10 months ago
Load images when they are needed
|Reported by:||humitos||Owned by:||humitos|
|Priority:||Unspecified by Maintainer||Milestone:||Unspecified by Release Team|
Typing Turtle is loading all the SVG images (62 images) at startup. This makes the activity to spend some time at the beggining and to consume to much memory.
I think it should load the SVG images at the moment they are needed by the activity.
This is the chunk of code (keyboard.py L#138) that is doing this work:
for filename in glob.iglob('images/OLPC*.svg'): image = GdkPixbuf.Pixbuf.new_from_file_at_scale( filename, scale_width, self.height, False) name = os.path.basename(filename) self.images[name] = image