ide: improved startup time (not checking ide-aux file times if they are not local)

git-svn-id: svn://ultimatepp.org/upp/trunk@11462 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
cxl 2017-11-13 11:23:59 +00:00
parent c91cd8d5f1
commit ed3c44de74
2 changed files with 14 additions and 3 deletions

View file

@ -201,6 +201,17 @@ void WorkspaceWork::SaveLoadPackage(bool sel)
SyncWorkspace();
}
bool PathIsLocal(const String& path)
{
#ifdef PLATFORM_WIN32
char drive[4] = "?:\\";
*drive = *path;
return GetDriveType(drive) == DRIVE_FIXED;
#else
return false;
#endif
}
void WorkspaceWork::LoadActualPackage()
{
Time utime = FileGetTime(ConfigFile("version"));
@ -220,7 +231,7 @@ void WorkspaceWork::LoadActualPackage()
if(open) {
Color uln = Null;
String p = SourcePath(GetActivePackage(), f);
if(showtime) {
if(showtime && (findarg(actualpackage, "<ide-aux>", "<prj-aux>", "<temp-aux>") < 0 || PathIsLocal(p))) {
FindFile ff(p);
if(ff) {
Time ftm = Time(ff.GetLastWriteTime());

View file

@ -77,7 +77,7 @@ bool IsAssembly(const String& s)
return false;
}
void PreperEditorMode(const Vector<String>& args, Ide& ide, bool& clset)
void StartEditorMode(const Vector<String>& args, Ide& ide, bool& clset)
{
if(args.IsEmpty() || clset) {
return;
@ -413,7 +413,7 @@ void AppMain___()
DelTemps();
PreperEditorMode(arg, ide, clset);
StartEditorMode(arg, ide, clset);
if(splash_screen && !ide.IsEditorMode()) {
ShowSplash();