mirror of
https://github.com/MirrorNetworking/Mirror.git
synced 2024-11-18 02:50:32 +00:00
Weaver: group allocations together
This commit is contained in:
parent
4ad2af4f74
commit
71eb7cb91d
@ -140,13 +140,9 @@ public static bool Weave(AssemblyDefinition asmDef)
|
||||
|
||||
weaverTypes = new WeaverTypes(CurrentAssembly, Log);
|
||||
|
||||
CreateGeneratedCodeClass();
|
||||
|
||||
// WeaverList depends on WeaverTypes setup because it uses Import
|
||||
weaverLists = new WeaverLists();
|
||||
|
||||
System.Diagnostics.Stopwatch rwstopwatch = System.Diagnostics.Stopwatch.StartNew();
|
||||
|
||||
// initialize readers & writers with this assembly.
|
||||
// we need to do this in every Process() call.
|
||||
// otherwise we would get
|
||||
@ -155,6 +151,9 @@ public static bool Weave(AssemblyDefinition asmDef)
|
||||
writers = new Writers(CurrentAssembly, weaverTypes, Log);
|
||||
readers = new Readers(CurrentAssembly, weaverTypes, Log);
|
||||
|
||||
CreateGeneratedCodeClass();
|
||||
|
||||
System.Diagnostics.Stopwatch rwstopwatch = System.Diagnostics.Stopwatch.StartNew();
|
||||
// Need to track modified from ReaderWriterProcessor too because it could find custom read/write functions or create functions for NetworkMessages
|
||||
bool modified = ReaderWriterProcessor.Process(CurrentAssembly, writers, readers);
|
||||
rwstopwatch.Stop();
|
||||
|
Loading…
Reference in New Issue
Block a user