perf(YouTube - Client spoof): Reduce timeout to fetch storyboard renderer

Because this is blocking the UI thread, a short timeout is preferable.
This commit is contained in:
oSumAtrIX 2023-11-12 16:31:44 +01:00
parent 5f30100fd5
commit 847cce43f6
No known key found for this signature in database
GPG Key ID: A9B3094ACDB604B4

View File

@ -63,7 +63,7 @@ public class SpoofSignaturePatch {
private static StoryboardRenderer getRenderer() { private static StoryboardRenderer getRenderer() {
if (rendererFuture != null) { if (rendererFuture != null) {
try { try {
return rendererFuture.get(4000, TimeUnit.MILLISECONDS); return rendererFuture.get(2000, TimeUnit.MILLISECONDS);
} catch (TimeoutException ex) { } catch (TimeoutException ex) {
LogHelper.printDebug(() -> "Could not get renderer (get timed out)"); LogHelper.printDebug(() -> "Could not get renderer (get timed out)");
} catch (ExecutionException | InterruptedException ex) { } catch (ExecutionException | InterruptedException ex) {