Search Unity

  1. Unity 2019.1 is now released.
    Dismiss Notice
  1. Micz84

    Micz84

    Joined:
    Jul 21, 2012
    Posts:
    219
    I understand that it is the first element in a given key of MultiHashMap, but it same entity won't be twice in different keys as they are a hash of position. But maybe I am still missing something.

    I wish code had some comments :) explaining why everything is done as it is it would help.
     
  2. OleJuergensen

    OleJuergensen

    Joined:
    Mar 21, 2018
    Posts:
    4
    Yes, it does not seem to make sense. The HashPositions job would have to add the same entity to the hashMap multiple times. Or at least the same index, so maybe the index is not unique? Actually I find several thousand boids, but indeices always seem to be in the hundreds. So I guess the index is not unique.
     
    Last edited: Feb 10, 2019
  3. OleJuergensen

    OleJuergensen

    Joined:
    Mar 21, 2018
    Posts:
    4
    Okay, so the HashPositions job that originally fills the HashMap is a
    IJobProcessComponentDataWithEntity, which uses chunk iteration. The indices it writes to the hashMap as values are chunk indices and therefore multiple entities have the same index. I think the naming of many signatures in ECS could be improved. The lack of documentation and comments does not help either XD
     
  4. Ziboo

    Ziboo

    Joined:
    Aug 30, 2011
    Posts:
    290
    Is that normal to have poor performance in the samples ?
    upload_2019-3-19_23-13-44.png
     
  5. Antypodish

    Antypodish

    Joined:
    Apr 29, 2014
    Posts:
    4,084
    Out of interest, what is your hardware specs?
     
  6. recursive

    recursive

    Joined:
    Jul 12, 2012
    Posts:
    514
    Do you have burst jobs enabled? What level do you have set for stack trace logging?
     
  7. Scott-Michaud

    Scott-Michaud

    Joined:
    May 26, 2015
    Posts:
    13
    I occasionally get massive slowdowns through Semaphore.WaitForSignal. It often clears up on its own... sometimes without even restarting Unity or changing scenes.

    There's a thread on it here: https://forum.unity.com/threads/extremely-slow-editor-in-2019-2-0a7.640354/#post-4318279

    Sometimes it happens in editor. Sometimes it happens in a standalone build. I've experienced it on 2018.3 and 2019.1. The original author of the thread experienced it on 2019.2. It hasn't been a problem for me for a few days.

    Long story short: If it's affecting you (and if it's the same problem) then you might be able to just reboot or wait and it'll run faster again.

    A bug has been opened but I don't think Unity has been able to replicate it.
     
  8. Ziboo

    Ziboo

    Joined:
    Aug 30, 2011
    Posts:
    290
    It was apparently "Burst Safety Check" the issue.
    Weird things is that in the menu it was shown as disable. By toggle it twice, it seems to fixed the issue.
    Some kind of a refresh issue apparently

    Edit: Btw I'm running on 2019.1.0b6
     
    Last edited: Mar 20, 2019
  9. futurlab_peterh

    futurlab_peterh

    Joined:
    Jan 23, 2018
    Posts:
    18

    I'm getting massive Semaphore.WaitForSignal on PS4 and Switch builds using 2019.1.0b9. I've tried playing around with Burst settings as suggested, but that made no difference at all.

    What did help me was to uncheck Development Build on the build settings; on Switch this made our current builds go from 28fps to 48fps. Of course there's more to it than just the WaitForSignal thing, but I don't recall having such a performance improvement by just unchecking it.

    We do lose the ability to profile and debug builds, but it's useful as a workaround.

    upload_2019-3-29_9-49-14.png
     
    Alverik and learc83 like this.