Search Unity

Feedback Please optimize PSDImporter

Discussion in '2D' started by Xarbrough, Nov 19, 2020.

  1. Xarbrough

    Xarbrough

    Joined:
    Dec 11, 2014
    Posts:
    1,188
    It's taking relatively long to import PSD and PSB files in our project (much longer than 3D models, audio clips, or regular textures). Would it be possible to optimize the PSDImporter? I don't really see a reason why a 5 MB PSD with 3 layers should import slower than 5 textures with a total of 50 MB. The PSD import seems to take multiple minutes, whereas my other assets finish in a few seconds.

    I've tried to profile this myself and it looks as if although the job system does some tasks nicely in parallel (e.g. FindTightRectJob), it stalls and waits for PDNAlphaMaskJob. Then it has a lot of idle in between. It kind of looks as if doing the whole thing on the main thread would be faster in the end.

    Thanks for taking a look into this!

    And please let me know if there are any settings I can apply to make the import faster. Would this work if I defined a preset for PSD and disable some of the functionality I don't need? Currently, I don't see any differences, but maybe I haven't disabled the right setting yet.