mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/jpexs-decompiler.git
synced 2026-06-22 20:55:33 +00:00
performance fixes
This commit is contained in:
@@ -804,7 +804,7 @@ public class ABCPanel extends JPanel implements ItemListener, ActionListener, Se
|
||||
|
||||
try {
|
||||
String oldSp = null;
|
||||
List<ScriptPack> packs = abc.script_info.get(oldIndex).getPacks(abc, oldIndex);
|
||||
List<ScriptPack> packs = abc.script_info.get(oldIndex).getPacks(abc, oldIndex, null);
|
||||
if (!packs.isEmpty()) {
|
||||
oldSp = packs.get(0).getClassPath().toString();
|
||||
}
|
||||
|
||||
@@ -81,7 +81,8 @@ public class ClassesListTreeModel extends AS3ClassTreeItem implements TreeModel
|
||||
}
|
||||
}
|
||||
|
||||
AS3Package pkg = ensurePackage(item.getClassPath().packageStr);
|
||||
String packageStr = item.getClassPath().packageStr;
|
||||
AS3Package pkg = ensurePackage(packageStr);
|
||||
pkg.addScriptPack(item);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -47,7 +47,7 @@ public class DebuggerTools {
|
||||
private static ScriptPack getDebuggerScriptPack(SWF swf) {
|
||||
for (ABCContainerTag ac : swf.getAbcList()) {
|
||||
ABC a = ac.getABC();
|
||||
for (ScriptPack m : a.getScriptPacks()) {
|
||||
for (ScriptPack m : a.getScriptPacks(DEBUGGER_PACKAGE)) {
|
||||
if (isDebuggerClass(m.getClassPath().packageStr, null)) {
|
||||
return m;
|
||||
}
|
||||
@@ -64,11 +64,18 @@ public class DebuggerTools {
|
||||
if (tested == null) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// fast check, because dynamic regex compile and match is expensive
|
||||
if (!tested.startsWith(DEBUGGER_PACKAGE)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (cls == null) {
|
||||
cls = "";
|
||||
} else {
|
||||
cls = "\\." + Pattern.quote(cls);
|
||||
}
|
||||
|
||||
return tested.matches(Pattern.quote(DEBUGGER_PACKAGE) + "(\\.pkg[a-f0-9]+)?" + cls);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user