How do the "Blink and You'll Miss It: 1 Turn Victory" Duel Replays manage to win?

SSH does a reverse lookup to resolve the connecting host, the delay you encounter is either due to slow response or more likely a time out.

If you cannot perform reverse resolution from that host, you can alternatively disable the reverse lookup of sshd in the configuration file sshd_config. Look for and change the following entry:

UseDNS no


Based on the comment by @MrD, I found a working solution.

I implemented a custom theme negotiator based on this information:

  • Blog post: Dynamic theme switching in Drupal 8
  • Blog post: Choose your theme dynamically in Drupal 8 with theme negotiation
  • Drupal Answers: How can I programmatically change the active theme?

I needed to change the theme for the admin content page, so here is the code I used:

mymodule.services.yml

  MYMODULE.theme.negotiator:
    class: Drupal\MYMODULE\Theme\ThemeNegotiator
    tags:
      - { name: theme_negotiator, priority: -20 }

Here, I used a low priority to ensure my code runs first.

MYMODULE/src/Theme/ThemeNegotiator.php

<?php

namespace Drupal\MYMODULE\Theme;

use Drupal\Core\Routing\RouteMatchInterface;
use Drupal\Core\Theme\ThemeNegotiatorInterface;

/**
 * Select the correct theme for various routes.
 */
class ThemeNegotiator implements ThemeNegotiatorInterface {

  /**
   * {@inheritDoc}
   */
  public function applies(RouteMatchInterface $route_match) {
    return $this->negotiateRoute($route_match) ? TRUE : FALSE;
  }

  /**
   * {@inheritDoc}
   */
  public function determineActiveTheme(RouteMatchInterface $route_match) {
    return $this->negotiateRoute($route_match) ?: NULL;
  }

  /**
   * Select the theme for special cases.
   *
   * @param \Drupal\Core\Routing\RouteMatchInterface $route_match
   *   The currently matched route.
   *
   * @return bool|string
   *   The theme name to use (string) or false (bool).
   */
  private function negotiateRoute(RouteMatchInterface $route_match) {
    $route_name = $route_match->getRouteName();
    if ($route_name === 'system.admin_content') {
      return 'MYTHEMENAME';
    }
    else {
      return FALSE;
    }
  }

}