I have a C # application (.Net 4.5) that when loading a screen among other operations it searches the database for a background image and sounds. It turns out that for some loaded screens this operation (search for images + sounds) takes 29 seconds, which causes a bad experience to the user. I would like to create something so that this time would fall. I implemented 2 Threads one for each operation, but the execution time jumped to 31 seconds. Does anyone have a solution to improve this?
Task t1 = new Task(CarregarImagens);
t1.Start();
Task t2 = new Task(CarregarSons);
t2.Start();