Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice

C# Compiler Suggestion: Don't Reload Domains when IL is Unchanged

Discussion in 'Experimental Scripting Previews' started by Kleptine, Apr 6, 2020.

  1. Kleptine

    Kleptine

    Joined:
    Dec 23, 2013
    Posts:
    256
    Very often while waiting for the domain to reload, I'll notice a stray comment, fix formatting, or generally cleanup the code I just wrote. Naturally, this triggers another domain reload, which is frustrating. I have to be very careful not to touch C# files too often.

    However, in many cases the generated IL hasn't changed, and we shouldn't need to perform a domain reload in these cases. I would guess that caching the IL and performing this check would cut out about 20% of the domain reloads I wait through in normal development.

    The downside is that you would no longer be able to force a domain reload by changing whitespace in a file (for debugging). Realistically, though, it's more sensible to address this need with some sort of dedicated 'reload domains' button in the menus.
     
  2. JesseSTG

    JesseSTG

    Joined:
    Jan 10, 2019
    Posts:
    236
    Seconded.
     
  3. JoNax97

    JoNax97

    Joined:
    Feb 4, 2016
    Posts:
    611
    Thirded.