Join dialog performance improvement
This commit is contained in:
@@ -1,6 +1,7 @@
|
|||||||
package mindustry.ui.dialogs;
|
package mindustry.ui.dialogs;
|
||||||
|
|
||||||
import arc.*;
|
import arc.*;
|
||||||
|
import arc.freetype.FreeTypeFontGenerator.*;
|
||||||
import arc.graphics.*;
|
import arc.graphics.*;
|
||||||
import arc.input.*;
|
import arc.input.*;
|
||||||
import arc.math.*;
|
import arc.math.*;
|
||||||
@@ -35,6 +36,7 @@ public class JoinDialog extends BaseDialog{
|
|||||||
int refreshes;
|
int refreshes;
|
||||||
boolean showHidden;
|
boolean showHidden;
|
||||||
TextButtonStyle style;
|
TextButtonStyle style;
|
||||||
|
Task fontIgnoreDirtyTask;
|
||||||
|
|
||||||
String lastIp;
|
String lastIp;
|
||||||
int lastPort, lastColumns = -1;
|
int lastPort, lastColumns = -1;
|
||||||
@@ -413,6 +415,15 @@ public class JoinDialog extends BaseDialog{
|
|||||||
net.pingHost(resaddress, resport, res -> {
|
net.pingHost(resaddress, resport, res -> {
|
||||||
if(refreshes != cur) return;
|
if(refreshes != cur) return;
|
||||||
|
|
||||||
|
//don't recache the texture for a while
|
||||||
|
if(fontIgnoreDirtyTask == null){
|
||||||
|
FreeTypeFontData.ignoreDirty = true;
|
||||||
|
fontIgnoreDirtyTask = Time.runTask(60f, () -> {
|
||||||
|
FreeTypeFontData.ignoreDirty = false;
|
||||||
|
fontIgnoreDirtyTask = null;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
if(!serverSearch.isEmpty() && !(group.name.toLowerCase().contains(serverSearch)
|
if(!serverSearch.isEmpty() && !(group.name.toLowerCase().contains(serverSearch)
|
||||||
|| res.name.toLowerCase().contains(serverSearch)
|
|| res.name.toLowerCase().contains(serverSearch)
|
||||||
|| res.description.toLowerCase().contains(serverSearch)
|
|| res.description.toLowerCase().contains(serverSearch)
|
||||||
|
|||||||
@@ -25,4 +25,4 @@ org.gradle.caching=true
|
|||||||
#used for slow jitpack builds; TODO see if this actually works
|
#used for slow jitpack builds; TODO see if this actually works
|
||||||
org.gradle.internal.http.socketTimeout=100000
|
org.gradle.internal.http.socketTimeout=100000
|
||||||
org.gradle.internal.http.connectionTimeout=100000
|
org.gradle.internal.http.connectionTimeout=100000
|
||||||
archash=7a2f8eada1
|
archash=5bbfaf2ad9
|
||||||
|
|||||||
Reference in New Issue
Block a user