3
0
Mirror von https://github.com/IntellectualSites/FastAsyncWorldEdit.git synchronisiert 2024-12-25 02:20:07 +01:00

Added debug messages to diagnose a critical CPU usage issue

Dieser Commit ist enthalten in:
MattBDev 2020-02-13 18:15:45 -05:00
Ursprung 73c5e34040
Commit 7e7fc89e81
2 geänderte Dateien mit 14 neuen und 11 gelöschten Zeilen

Datei anzeigen

@ -70,12 +70,14 @@ public interface IBatchProcessor {
}
try {
int layer = (minY - 15) >> 4;
Fawe.imp().debug("layer: " + layer + " < " +((maxY + 15) >> 4));
while (layer < (maxY + 15) >> 4) {
if (layer > -1) {
if (set.hasSection(layer)) {
return true;
}
layer++;
Fawe.imp().debug("layer++ : " + layer);
}
}
} catch (ArrayIndexOutOfBoundsException exception) {

Datei anzeigen

@ -35,6 +35,7 @@ import com.sk89q.worldedit.session.request.Request;
import com.sk89q.worldedit.util.Identifiable;
import com.sk89q.worldedit.util.auth.Subject;
import com.sk89q.worldedit.util.formatting.text.Component;
import com.sk89q.worldedit.util.formatting.text.format.TextColor;
import java.io.File;
import java.io.IOException;
@ -110,7 +111,7 @@ public interface Actor extends Identifiable, SessionOwner, Subject, MapMetadatab
* @param component The component to print
*/
default void printError(Component component) {
print(TranslatableComponent.of("fawe.error", component));
print(component.color(TextColor.RED));
}
/**
@ -119,7 +120,16 @@ public interface Actor extends Identifiable, SessionOwner, Subject, MapMetadatab
* @param component The component to print
*/
default void printInfo(Component component) {
print(TranslatableComponent.of("fawe.info", component));
print(component.color(TextColor.LIGHT_PURPLE));
}
/**
* Print a WorldEdit message.
*
* @param component The component to print
*/
default void printDebug(Component component) {
print(component.color(TextColor.GRAY));
}
/**
@ -136,15 +146,6 @@ public interface Actor extends Identifiable, SessionOwner, Subject, MapMetadatab
*/
boolean canDestroyBedrock();
/**
* Print a WorldEdit message.
*
* @param component The component to print
*/
default void printDebug(Component component) {
print(TranslatableComponent.of("fawe.debug", component));
}
/**
* Return whether this actor is a player.
*