4.5 hours to build project

Hi
In the past my project took anywhere from a few minutes to up to 10 to build for Android but now it takes hours

Have tried deleting cache, library and temp but makes no difference

Further the editor won’t close down when I’ve finished work

Any ideas on where to look or how to fix?

Thanks

how much space on your disk does the assets folder and Library/PackageCache take up? the combination of the two is approximately how much stuff is being processed, what speed is your disk? is the area removed from antivirus checking?

1 Like

thanks for getting back to me - 30 gb free on E drive where project resides; assets 6gb; packagecache 1gb
also program files drive (d) 60gb
c drive 26gb
have now excluded the folder from Defender and that appears to have worked… would love some additional info on that if you have the time
i never did this before and it was never a problem
is there a best practice for importing from asset store and 3rd party code to ensure no viruses? should they first to be checked and scanned in a protected folder before moving into the project

thanks for your help

Well, the asset store stuff goes into to a deep folder in your profile, so as long as you only exclude your unity development folders, it will be fine, cos it is downloaded the the assetstore cache first, and then loaded to your project from there. Id also like to think the asset store scans for viruses, I could be wrong - never heard of viruses in them mind, in part cos its often primarily models, pictures and code (text) … Antivirus is a good and essential thing, however, when you compile, the compiler goes to open a file, the av will then open, scan, check, and let it have access, maybe the compilers that generate a ton of temp files, which the av will then want to open, check and close, its like children squabbling over candy in a bowl , often things go wrong along the way.

Let me explain a bit like this

I worked for a company and the genius who wrote some software that needed to do a batch run every night
: the batch run

  • opened table1, went to row 1, decided if it needed to do anything… lets say it did
  • if needed… it then opened table1, went to row 1 and said are you the row I need
  • if yes, it then did something opening more tables, and so on
  • etc

Now, when you have say 100 rows, the tables are small, the scanning through to get to the matching line, etc, all happen so fast, you wouldnt know

Now have 1M lines, so on line 1M , from the first copy of table1, it then opened table1 again, and asked every row in turn, are you the row I wanted… But opening a table with > 1M rows, is not a 0ms job, especially back in the days where computers barely had MB of memory let alone Gbs of memory…

so now you’ve got 2 copies of the huge table, and other tables (and I have a feeling more copies of the big table, its been a few years), but this batch job took, all night.

Lady I worked with (after we all had laughed at how this worked) sat down… with a bit of common sense, did a more, select * from table1 where todo=true, so, like 200 lines maybe, now USE that copy already, and do whatever it was you needed… batch run took 20 mins.

You think of what you asked your computer to do, for every time a file was opened, written to etc, your av was duplicating it to check it was OK… This is why it is common to have no AV on the source/build areas, because potentially it is doing it a lot. You may also feel it in the editor, for all the time it reloads domains :stuck_out_tongue:

I noticed a heck of a build time difference when i upgraded my disk to a faster one.

1 Like

Great explanation, thank you