I was looking for an excuse to use VTune again 😉   (thanks to Anders map2pdb!) and here's a flame graph of what's going on while the form is shown:   (this is without any sounds being played in the background since I don't have BASS dll lying around - and I'm glad I don't)   So the Sleep in ApplicationIdle wastes about one third of the total time. And while FormCreate does spend quite some time in InitializeTreeView, half of it is now because the OnExpanded handler is called during it (that's what @Lars Fosdal was hinting at). But in the end most of the time is spent reading and parsing the level info that is spread over hundreds of text files.  
    • Thanks
    1