Couple of minor performance tweaks. Tests on my Windows VM show a consistent 30% startup time reduction.

This commit is contained in:
Dave Page 2017-06-11 13:56:49 +01:00
parent 49976b1934
commit f0d287588a
2 changed files with 2 additions and 8 deletions

View File

@ -285,10 +285,6 @@ int main(int argc, char * argv[])
server->start();
// This is a hack. Wait a second and then check to see if the server thread
// is still running. If it's not, we probably had a startup error
delay(1000);
// Any errors?
if (server->isFinished() || server->getError().length() > 0)
{
@ -332,7 +328,7 @@ int main(int argc, char * argv[])
// Generate the app server URL
QString appServerUrl = QString("http://localhost:%1/?key=%2").arg(port).arg(key);
QString appServerUrl = QString("http://127.0.0.1:%1/?key=%2").arg(port).arg(key);
// Now the server should be up, we'll attempt to connect and get a response.
// We'll retry in a loop a few time before aborting if necessary.
@ -354,8 +350,6 @@ int main(int argc, char * argv[])
exit(1);
}
delay(1000);
}
// Create & show the main window

View File

@ -156,7 +156,7 @@ DESKTOP_USER = 'pgadmin4@pgadmin.org'
# NOTE: This is NOT recommended for production use, only for debugging
# or testing. Production installations should be run as a WSGI application
# behind Apache HTTPD.
DEFAULT_SERVER = 'localhost'
DEFAULT_SERVER = '127.0.0.1'
# The default port on which the app server will listen if not set in the
# environment by the runtime