public static void UpdateParseCacheAsync(ASTStorage Cache) { // Return immediately if nothing there to parse if (Cache.ParsedGlobalDictionaries.Count < 1) { return; } var th = new Thread(() => { try { LoggingService.LogInfo("Update parse cache ({0} directories) - this may take a while!", Cache.ParsedGlobalDictionaries.Count); var perfResults = Cache.UpdateCache(); foreach (var perfData in perfResults) { LoggingService.LogInfo( "Parsed {0} files in \"{1}\" in {2}s (~{3}ms per file)", perfData.AmountFiles, perfData.BaseDirectory, Math.Round(perfData.TotalDuration, 3), Math.Round(perfData.FileDuration * 1000)); } } catch (Exception ex) { LoggingService.LogError("Error while updating parse caches", ex); } }); th.IsBackground = true; th.Start(); }
public void AddDirectory(string directory, ASTStorage storage) { lock (directoriesToParse){ directoriesToParse.Enqueue(new DDirectoryParserItem(directory, storage)); } start(); }
public void AddDirectory(string directory, ASTStorage storage) { lock (directoriesToParse){ directoriesToParse.Enqueue(new DDirectoryParserItem(directory, storage)); } start(); }
void Init() { LocalIncludeCache = new ASTStorage(); //if(DCompiler.Instance!=null) // UsedCompilerVendor = DCompiler.Instance.DefaultCompiler; }
public void AddDirectoryRange(List<string> directories, ASTStorage storage) { foreach(string directory in directories) { lock(directoriesToParse){ directoriesToParse.Enqueue(new DDirectoryParserItem(directory, storage)); } } start(); }
public void AddDirectoryRange(List <string> directories, ASTStorage storage) { foreach (string directory in directories) { lock (directoriesToParse){ directoriesToParse.Enqueue(new DDirectoryParserItem(directory, storage)); } } start(); }
public DDirectoryParserItem(string directory, ASTStorage storage) { this.Directory = directory; this.Storage = storage; }
public static void UpdateParseCacheAsync(ASTStorage Cache) { // Return immediately if nothing there to parse if (Cache.ParsedGlobalDictionaries.Count < 1) return; var th = new Thread(() => { try { LoggingService.LogInfo("Update parse cache ({0} directories) - this may take a while!", Cache.ParsedGlobalDictionaries.Count); var perfResults = Cache.UpdateCache(); foreach (var perfData in perfResults) { LoggingService.LogInfo( "Parsed {0} files in \"{1}\" in {2}s (~{3}ms per file)", perfData.AmountFiles, perfData.BaseDirectory, Math.Round(perfData.TotalDuration,3), Math.Round( perfData.FileDuration*1000)); } } catch (Exception ex) { LoggingService.LogError("Error while updating parse caches", ex); } }); th.IsBackground = true; th.Start(); }
void Init() { LocalIncludeCache = new ASTStorage(); //if(DCompiler.Instance!=null) // UsedCompilerVendor = DCompiler.Instance.DefaultCompiler; }
public DDirectoryParserItem(string directory, ASTStorage storage) { this.Directory = directory; this.Storage = storage; }