Changeset 392
- Timestamp:
- Aug 8, 2022, 8:04:09 PM (2 years ago)
- Location:
- binary-improvements2
- Files:
-
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
binary-improvements2/7dtd-server-fixes/7dtd-server-fixes.csproj
r391 r392 47 47 <DebugSymbols>true</DebugSymbols> 48 48 </PropertyGroup> 49 <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug_Profiler|AnyCPU' "> 50 <OutputPath>..\bin\Mods\Allocs_CommonFunc\</OutputPath> 51 <DefineConstants>ENABLE_PROFILER</DefineConstants> 52 <DebugSymbols>true</DebugSymbols> 53 <DebugType>full</DebugType> 54 </PropertyGroup> 49 55 <ItemGroup> 50 56 <Reference Include="Assembly-CSharp"> … … 83 89 <ItemGroup> 84 90 <Compile Include="src\AssemblyInfo.cs" /> 91 <Compile Include="src\FileCache\InvalidateCachesCmd.cs" /> 85 92 <Compile Include="src\JSON\JsonManualBuilder.cs" /> 86 93 <Compile Include="src\LiveData\Animals.cs" /> -
binary-improvements2/7dtd-server-fixes/src/FileCache/AbstractCache.cs
r351 r392 1 using System.Collections.Generic; 2 1 3 namespace AllocsFixes.FileCache { 2 4 public abstract class AbstractCache { 3 5 public abstract byte[] GetFileContent (string _filename); 6 public abstract (int, int) Invalidate (); 7 8 protected AbstractCache () { 9 caches.Add (this); 10 } 11 12 private static readonly List<AbstractCache> caches = new List<AbstractCache> (); 13 public static (int, int) InvalidateAllCaches () { 14 int filesDropped = 0; 15 int bytesDropped = 0; 16 17 foreach (AbstractCache cache in caches) { 18 (int, int) returned = cache.Invalidate (); 19 filesDropped += returned.Item1; 20 bytesDropped += returned.Item2; 21 } 22 23 return (filesDropped, bytesDropped); 24 } 4 25 } 5 26 } -
binary-improvements2/7dtd-server-fixes/src/FileCache/DirectAccess.cs
r391 r392 14 14 return null; 15 15 } 16 17 public override (int, int) Invalidate () { 18 return (0, 0); 19 } 16 20 } 17 21 } -
binary-improvements2/7dtd-server-fixes/src/FileCache/MapTileCache.cs
r391 r392 114 114 } 115 115 116 public override (int, int) Invalidate () { 117 return (0, 0); 118 } 119 116 120 private static byte[] ReadAllBytes (string _path) { 117 121 using (FileStream fileStream = new FileStream(_path, FileMode.Open, FileAccess.Read, FileShare.Read, 4096)) { -
binary-improvements2/7dtd-server-fixes/src/FileCache/SimpleCache.cs
r391 r392 29 29 return null; 30 30 } 31 32 public override (int, int) Invalidate () { 33 (int, int) result = (0, 0); 34 35 lock (fileCache) { 36 result.Item1 = fileCache.Count; 37 foreach ((string _, byte[] data) in fileCache) { 38 result.Item2 += data.Length; 39 } 40 41 fileCache.Clear (); 42 } 43 44 return result; 45 } 31 46 } 32 47 } -
binary-improvements2/CommandExtensions/CommandExtensions.csproj
r391 r392 32 32 <DebugType>full</DebugType> 33 33 <DebugSymbols>true</DebugSymbols> 34 </PropertyGroup> 35 <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug_Profiler|AnyCPU' "> 36 <OutputPath>..\bin\Mods\TFP_CommandExtensions\</OutputPath> 37 <DefineConstants>ENABLE_PROFILER</DefineConstants> 38 <DebugSymbols>true</DebugSymbols> 39 <DebugType>full</DebugType> 34 40 </PropertyGroup> 35 41 <ItemGroup> -
binary-improvements2/MapRendering/MapRendering.csproj
r391 r392 35 35 <DebugType>full</DebugType> 36 36 <DebugSymbols>true</DebugSymbols> 37 </PropertyGroup> 38 <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug_Profiler|AnyCPU' "> 39 <OutputPath>..\bin\Mods\TFP_MapRendering\</OutputPath> 40 <DefineConstants>ENABLE_PROFILER</DefineConstants> 41 <DebugSymbols>true</DebugSymbols> 42 <DebugType>full</DebugType> 37 43 </PropertyGroup> 38 44 <ItemGroup> -
binary-improvements2/MarkersMod/MarkersMod.csproj
r391 r392 35 35 <DebugType>full</DebugType> 36 36 <DebugSymbols>true</DebugSymbols> 37 </PropertyGroup> 38 <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug_Profiler|AnyCPU' "> 39 <OutputPath>..\bin\Mods\Xample_MarkersMod\</OutputPath> 40 <DefineConstants>ENABLE_PROFILER</DefineConstants> 41 <DebugSymbols>true</DebugSymbols> 42 <DebugType>full</DebugType> 37 43 </PropertyGroup> 38 44 <ItemGroup> -
binary-improvements2/SpaceWizards.HttpListener/SpaceWizards.HttpListener.csproj
r391 r392 27 27 <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release_Profiler|AnyCPU' "> 28 28 <OutputPath>..\bin\Mods\TFP_WebServer\</OutputPath> 29 <DefineConstants> ENABLE_PROFILER;UNITY_NETFRAMEWORK</DefineConstants>29 <DefineConstants>UNITY_NETFRAMEWORK;ENABLE_PROFILER</DefineConstants> 30 30 <Optimize>true</Optimize> 31 31 <WarningLevel>4</WarningLevel> … … 39 39 <DefineConstants>UNITY_NETFRAMEWORK</DefineConstants> 40 40 <DebugSymbols>true</DebugSymbols> 41 </PropertyGroup> 42 <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug_Profiler|AnyCPU' "> 43 <OutputPath>..\bin\Mods\TFP_WebServer\</OutputPath> 44 <DefineConstants>UNITY_NETFRAMEWORK;ENABLE_PROFILER</DefineConstants> 45 <DebugSymbols>true</DebugSymbols> 46 <DebugType>full</DebugType> 47 <AllowUnsafeBlocks>true</AllowUnsafeBlocks> 41 48 </PropertyGroup> 42 49 <ItemGroup> -
binary-improvements2/WebServer/WebServer.csproj
r391 r392 35 35 <DebugType>full</DebugType> 36 36 <DebugSymbols>true</DebugSymbols> 37 </PropertyGroup> 38 <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug_Profiler|AnyCPU' "> 39 <OutputPath>..\bin\Mods\TFP_WebServer\</OutputPath> 40 <DefineConstants>ENABLE_PROFILER</DefineConstants> 41 <DebugSymbols>true</DebugSymbols> 42 <DebugType>full</DebugType> 37 43 </PropertyGroup> 38 44 <ItemGroup>
Note:
See TracChangeset
for help on using the changeset viewer.