Now using a buffer for debug console output. No longer bog-slow on windows if the console is enabled.
This commit is contained in:
@@ -165,6 +165,9 @@ namespace {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
fprintf(stderr, "%s\n", message.c_str());
|
fprintf(stderr, "%s\n", message.c_str());
|
||||||
|
#if LL_WINDOWS
|
||||||
|
fflush(stderr); //Now using a buffer. flush is required.
|
||||||
|
#endif
|
||||||
if (ANSI_YES == mUseANSI) colorANSI("0"); // reset
|
if (ANSI_YES == mUseANSI) colorANSI("0"); // reset
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -142,6 +142,7 @@ void LLImageJ2C::openDSO()
|
|||||||
fprintf(stderr, "error: %d, %s\n", rv, errbuf);
|
fprintf(stderr, "error: %d, %s\n", rv, errbuf);
|
||||||
apr_dso_error(j2cimpl_dso_handle, errbuf, sizeof(errbuf));
|
apr_dso_error(j2cimpl_dso_handle, errbuf, sizeof(errbuf));
|
||||||
fprintf(stderr, "dso-error: %d, %s\n", rv, errbuf);
|
fprintf(stderr, "dso-error: %d, %s\n", rv, errbuf);
|
||||||
|
fflush(stderr);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if ( j2cimpl_dso_handle )
|
if ( j2cimpl_dso_handle )
|
||||||
|
|||||||
@@ -112,7 +112,7 @@ LLDir_Win32::LLDir_Win32()
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
fprintf(stderr, "Couldn't get APP path, assuming current directory!");
|
LL_WARNS("AppInit") << "Couldn't get APP path, assuming current directory!\n" << LL_ENDL;
|
||||||
GetCurrentDirectory(MAX_PATH, w_str);
|
GetCurrentDirectory(MAX_PATH, w_str);
|
||||||
mExecutableDir = utf16str_to_utf8str(llutf16string(w_str));
|
mExecutableDir = utf16str_to_utf8str(llutf16string(w_str));
|
||||||
// Assume it's the current directory
|
// Assume it's the current directory
|
||||||
|
|||||||
@@ -365,7 +365,8 @@ void create_console()
|
|||||||
h_con_handle = _open_osfhandle(l_std_handle, _O_TEXT);
|
h_con_handle = _open_osfhandle(l_std_handle, _O_TEXT);
|
||||||
fp = _fdopen( h_con_handle, "w" );
|
fp = _fdopen( h_con_handle, "w" );
|
||||||
*stderr = *fp;
|
*stderr = *fp;
|
||||||
setvbuf( stderr, NULL, _IONBF, 0 );
|
setvbuf( stderr, NULL, _IOFBF, 1024 ); //Assigning a buffer improves speed a LOT, esp on vista/win7
|
||||||
|
//_IOLBF is borked.
|
||||||
}
|
}
|
||||||
|
|
||||||
LLAppViewerWin32::LLAppViewerWin32(const char* cmd_line) :
|
LLAppViewerWin32::LLAppViewerWin32(const char* cmd_line) :
|
||||||
|
|||||||
Reference in New Issue
Block a user