is LoadImage slow? Is there a faster way?

In my program, i want the user to have access to thousands of different photos that he/she can view. The photos are loaded from a server and stored on the users hard drive. If the photo is already stored on the HD, the program uses the photo rather then downloading it again.
As it takes waaay to long to setup and texture 5000 objects at once, i load them in pairs of 20. The user can then scroll (using a regular scrollbar) to move the line of photos.

Once the image is downloaded i do the following:

Texture2D asd = new Texture2D(200, 200, TextureFormat.ARGB32, false);
asd.LoadImage(System.IO.File.ReadAllBytes(RESOURCE_DIRECTORY + imageName));
renderer.material.mainTexture = asd;

It all seems to be working fine. The only problem is that i takes along time to apply the texture. It averages about 0.013 seconds on my computer (which is a very new one). That may not seem like much, but as i use a scrollbar, i have to wait 0.3 every time the OnGUI updates and receivs a new value from the scrollbar.

So my question: Is there a faster way of doing this?

My testing indicates that it is the LoadImage() that is the time consumer. WOuld using getPixels/setPixels enhance my performance?

The way i understand it, having the image in the assets/resource-folder will speed things up greately, but thats only if the image is there when i compile, right?

I appriciate all help and feed back.

Get/Set Pixels can be a slow operation.

Something that could help speed things up would be to continually load new Textures, and instead of trying to place those within the existing texture, just change the mainTexture of the material. I.e. you get a List of Textures, that continually removes old references and adds new nearby ones. Then instead of taking the existing textures and trying to change their data, you just make your GUI point to different textures when it needs to. Call ReadAllBytes and LoadImage only once per texture at any time, and then store it in memory if you scroll back to it, and if you scroll away don’t modify asd, but rather a new texture object. And don’t change the image in OnGUI, but Update. OnGUI can get called many times per draw (at least twice, but you only need to set a new texture once per draw. Save the scrollbar value from OnGUI and use it in LateUpdate or Update.

Also it’s not necessarily LoadImage that’s slow but the combination of two slow functions (ReadAllBytes is slow, like all i/o functions).

Load via async operations before you need them and you can take advantage of threading and not have a performance drop by constant file access.