| Reply | « Previous Thread | Next Thread » |
|
Just a tip others might find usefull.
My rather large app (>1k lines) imports a huge list of modules. This really slowed down the start of the application. One solution could be to import the module once they are needed, but another solution would be to import the modules that are not immediately needed in the background. For instance when showing a splash screen. This is how I accomplish that: Code:
def importRest():
os, key_codes, time, audio, location, socket, urllib =[__import__('os'),
__import__('key_codes'),
__import__('time'),
__import__('audio'),
__import__('location'),
__import__('socket'),
__import__('urllib')]
thread.start_new_thread(importRest,())
|
| bercobeute |
| View Public Profile |
| Find all posts by bercobeute |
|
Quote:
I've been thinking about some kind of splashscreen and/or progressbar to show user that application is starting up. But this is just a thought yet... |
| Reply | « Previous Thread | Next Thread » |
| Thread Tools | Search this Thread |
|---|---|
| Rate This Thread | |
| Thread | Thread Starter | Forum | Replies | Last Post |
|---|---|---|---|---|
| Link errors when trying to Display bitmap | Bkc82 | Symbian Media (Graphics & Sounds) | 1 | 2006-01-16 23:46 |
| Thread function not being called | kamalsinghania | General Symbian C++ | 5 | 2006-01-04 13:28 |
| Can midlet run in the background thread? | crazyII | Mobile Java General | 4 | 2003-11-26 15:38 |
| Creating a background thread | pawel_z | General Symbian C++ | 7 | 2003-10-08 17:33 |
| Thread | Kalderas | General Symbian C++ | 4 | 2003-08-14 16:02 |