Hello Guest

Author Topic: Slow Sprite Collection Building  (Read 3836 times)

richicon

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 9
    • View Profile
Slow Sprite Collection Building
« on: June 27, 2014, 10:18:01 am »
Hi
I've just clicked commit and am typing this while waiting for it to finish building the sprite collection.. prob about 10 mins.
Ok the collection contains around 4000 tile from around 30 sheets.
I've removed all dicing and switched off duplicate checking but that doesn't make a major difference.
If it was stressing my computer I'd understand, but looking at resource monitor while it doing it and
none of the cpu cores are showing above 50%.. Average CPU is about 8% and nothing else is showing above 0.3%
virtually no disk access and all the queue's are empty
memory plenty is still free (about 30% used)  and 0 hard faults
so why is it taking so long
ok thought I'd wait for it to finish.... right it was only 6 mins... although with dicing and duplicate removal I think it was 10


unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: Slow Sprite Collection Building
« Reply #1 on: June 27, 2014, 11:16:32 am »
Its slow because all the image processing is being done in c#. Its single threaded, and the Unity api creates multiple copies of data in various places, which doesn't help things. There isn't a great deal that can be done I'm afraid. We did try some stuff avoiding the use of any unity classes (Texture2D being one of them) but that proved to be a significant amount of work for a very tiny proportion of our users.