Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
3
Question by x4000 · Dec 07, 2017 at 04:10 PM · compile

How do you find out what scripts are making your compile time slow?

If your scripts are still slow even after compiling separately via asmdef files, then the problem is with the domain reload, per here: https://forum.unity.com/threads/example-project-assembly-definition-files.482313/page-6#post-3314226

Comment
Add comment
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

2 Replies

· Add your reply
  • Sort: 
avatar image
3
Best Answer

Answer by x4000 · Dec 07, 2017 at 04:12 PM

I actually just posted this question because someone from Unity already answered it, and I felt like the answer needed more visibility: https://forum.unity.com/threads/example-project-assembly-definition-files.482313/page-3#post-3292894

.

From his post:

.

"Check your Editor.log for messages on how long individual assemblies took to compile and how many assemblies are recompiled on changes due to dependencies."

.

And then:

.

Editor freeze is because we reload all the assemblies. Typically we see long reload times when users have lots of code in InitializeOnLoad, Awake and other methods called during the reload. Figuring out what script code is causing the delay today is somewhat tricky, but we are working on a better solution.

.

The way to find script code that can cause long reload times today:

1) Open the Profiler, enable deep profiling and profiling in the editor.

2) Keep the profiler window visible, because you will need to "quickly" disable editor profiling.

3) Enter play mode

4) Once enter play mode is finished, exit play mode and disable editor profiling.

5) Find the frame that takes a long time to complete and then find scripts that run for a long time.

.

And then he provides a visual example.

Comment
Add comment · Show 1 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Bryan-Legend · Oct 30, 2019 at 09:32 AM 0
Share

In Unity 2019.2.0f1 having the Package $$anonymous$$anager tab open (even if it’s not showing) increases my Domain Reload time (both for compile and run) by FIVE ENTIRE SECONDS!!!!! Just closing the “Packages” tab cut my compile/domain reload times in half!!!!!!!!!

avatar image
1

Answer by Bryan-Legend · Oct 30, 2019 at 09:33 AM

In Unity 2019.2.0f1 having the Package Manager tab open (even if it’s not showing) increases my Domain Reload time (both for compile and run) by FIVE ENTIRE SECONDS!!!!! Just closing the “Packages” tab cut my compile/domain reload times in half!!!!!!!!!

Close any tabs you don't need and measure using Compile Time Tracker (https://github.com/DarrenTsung/DTCompileTimeTracker)

Comment
Add comment · Show 1 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image matheus_inmotionvr · Jul 06, 2020 at 12:46 PM 0
Share

Same here. I'm glad I found this answer. Thank you.

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

71 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Scripts won't compile unless I restart Unity 3 Answers

How do I call unmanaged functions in C from Unity if I don't have a .bundle? (Mac) 1 Answer

Why this shader compilation results in parse error? 1 Answer

Moving file failed 0 Answers

Saved MethodInfo variable resets on compile 2 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges