mirror of
https://github.com/GravitLauncher/Launcher
synced 2024-12-23 00:51:01 +03:00
[FIX] Оптимизация производительности поиска модов в других клиентах
This commit is contained in:
parent
877c26199d
commit
d4739d17ed
2 changed files with 7 additions and 4 deletions
|
@ -76,7 +76,7 @@ public void postDiff(UpdateRequest request, UpdateRequestEvent e, HashedDir.Diff
|
|||
{
|
||||
//Еще раз проверим корректность хеша
|
||||
//Возможно эта проверка избыточна
|
||||
if(file.isSame(ret, true))
|
||||
//if(file.isSame(ret, true))
|
||||
{
|
||||
Path source = request.getDir().resolve(path);
|
||||
LogHelper.debug("Copy file %s to %s", ret.toAbsolutePath().toString(), source.toAbsolutePath().toString());
|
||||
|
@ -101,12 +101,12 @@ public Path tryFind(NewLauncherSettings.HashedStoreEntry en, HashedFile file) th
|
|||
HashedFile tfile = (HashedFile) entry;
|
||||
if(tfile.isSame(file))
|
||||
{
|
||||
LogHelper.debug("[DIR:%s] Found file %s in %s", en.name, name, path);
|
||||
LogHelper.dev("[DIR:%s] Found file %s in %s", en.name, name, path);
|
||||
Path tdir = Paths.get(en.fullPath).resolve(path);
|
||||
try {
|
||||
if(tfile.isSame(tdir, true))
|
||||
{
|
||||
LogHelper.debug("[DIR:%s] Confirmed file %s in %s", en.name, name, path);
|
||||
LogHelper.dev("[DIR:%s] Confirmed file %s in %s", en.name, name, path);
|
||||
ret.set(tdir);
|
||||
return HashedDir.WalkAction.STOP;
|
||||
}
|
||||
|
|
|
@ -113,7 +113,10 @@ public static void debug(String format, Object... args) {
|
|||
|
||||
@LauncherAPI
|
||||
public static void dev(String format, Object... args) {
|
||||
dev(String.format(format, args));
|
||||
if(isDevEnabled())
|
||||
{
|
||||
dev(String.format(format, args));
|
||||
}
|
||||
}
|
||||
|
||||
@LauncherAPI
|
||||
|
|
Loading…
Reference in a new issue