diff --git a/docs/release-notes.md b/docs/release-notes.md index b2ef5a8d..dcb4a485 100644 --- a/docs/release-notes.md +++ b/docs/release-notes.md @@ -6,7 +6,6 @@ * Mod warnings are now listed alphabetically. * MacOS files starting with `._` are now ignored and can no longer cause skipped mods. * Simplified paranoid warning logs and reduced their log level. - * Reduced startup time when loading mod DLLs (thanks to ZaneYork!). * Fixed `BadImageFormatException` error detection. * Fixed black maps on Android for mods which use `.tmx` files. diff --git a/src/SMAPI/Framework/ModLoading/Framework/RecursiveRewriter.cs b/src/SMAPI/Framework/ModLoading/Framework/RecursiveRewriter.cs index aafdefc6..c774c038 100644 --- a/src/SMAPI/Framework/ModLoading/Framework/RecursiveRewriter.cs +++ b/src/SMAPI/Framework/ModLoading/Framework/RecursiveRewriter.cs @@ -57,11 +57,12 @@ namespace StardewModdingAPI.Framework.ModLoading.Framework /// Returns whether the module was modified. public bool RewriteModule() { - return this.Module.GetTypes().AsParallel().WithExecutionMode(ParallelExecutionMode.ForceParallelism).Select(type => + bool anyRewritten = false; + + foreach (TypeDefinition type in this.Module.GetTypes()) { - bool anyRewritten = false; if (type.BaseType == null) - return false; // special type like + continue; // special type like anyRewritten |= this.RewriteCustomAttributes(type.CustomAttributes); anyRewritten |= this.RewriteGenericParameters(type.GenericParameters); @@ -107,9 +108,9 @@ namespace StardewModdingAPI.Framework.ModLoading.Framework } } } + } - return anyRewritten; - }).Max(); + return anyRewritten; }