--- a/net/minecraft/Util.java
+++ b/net/minecraft/Util.java
@@ -90,9 +90,25 @@
     private static final int DEFAULT_MAX_THREADS = 255;
     private static final int DEFAULT_SAFE_FILE_OPERATION_RETRIES = 10;
     private static final String MAX_THREADS_SYSTEM_PROPERTY = "max.bg.threads";
-    private static final ExecutorService BACKGROUND_EXECUTOR = makeExecutor("Main");
+    private static final ExecutorService BACKGROUND_EXECUTOR = makeExecutor("Main", -1); // Paper - Perf: add priority
     private static final ExecutorService IO_POOL = makeIoExecutor("IO-Worker-", false);
     private static final ExecutorService DOWNLOAD_POOL = makeIoExecutor("Download-", true);
+    // Paper start - don't submit BLOCKING PROFILE LOOKUPS to the world gen thread
+    public static final ExecutorService PROFILE_EXECUTOR = Executors.newFixedThreadPool(2, new java.util.concurrent.ThreadFactory() {
+
+        private final AtomicInteger count = new AtomicInteger();
+
+        @Override
+        public Thread newThread(Runnable run) {
+            Thread ret = new Thread(run);
+            ret.setName("Profile Lookup Executor #" + this.count.getAndIncrement());
+            ret.setUncaughtExceptionHandler((Thread thread, Throwable throwable) -> {
+                LOGGER.error("Uncaught exception in thread " + thread.getName(), throwable);
+            });
+            return ret;
+        }
+    });
+    // Paper end - don't submit BLOCKING PROFILE LOOKUPS to the world gen thread
     private static final DateTimeFormatter FILENAME_DATE_TIME_FORMATTER = DateTimeFormatter.ofPattern("yyyy-MM-dd_HH.mm.ss", Locale.ROOT);
     public static final int LINEAR_LOOKUP_THRESHOLD = 8;
     public static final long NANOS_PER_MILLI = 1000000L;
@@ -109,6 +125,7 @@
         .filter(fileSystemProvider -> fileSystemProvider.getScheme().equalsIgnoreCase("jar"))
         .findFirst()
         .orElseThrow(() -> new IllegalStateException("No jar file system provider found"));
+    public static final double COLLISION_EPSILON = 1.0E-7; // Paper - Improve boat collision performance
     private static Consumer<String> thePauser = message -> {
     };
 
@@ -133,7 +150,7 @@
     }
 
     public static long getNanos() {
-        return timeSource.getAsLong();
+        return System.nanoTime(); // Paper
     }
 
     public static long getEpochMillis() {
@@ -144,15 +161,27 @@
         return FILENAME_DATE_TIME_FORMATTER.format(ZonedDateTime.now());
     }
 
-    private static ExecutorService makeExecutor(String name) {
-        int i = Mth.clamp(Runtime.getRuntime().availableProcessors() - 1, 1, getMaxThreads());
+    private static ExecutorService makeExecutor(String s, int priorityModifier) { // Paper - Perf: add priority
+        // Paper start - Perf: use simpler thread pool that allows 1 thread and reduce worldgen thread worker count for low core count CPUs
+        int cpus = Runtime.getRuntime().availableProcessors() / 2;
+        int i;
+        if (cpus <= 4) {
+            i = cpus <= 2 ? 1 : 2;
+        } else if (cpus <= 8) {
+            // [5, 8]
+            i = Math.max(3, cpus - 2);
+        } else {
+            i = cpus * 2 / 3;
+        }
+        i = Math.min(8, i);
+        i = Integer.getInteger("Paper.WorkerThreadCount", i);
         ExecutorService executorService;
         if (i <= 0) {
             executorService = MoreExecutors.newDirectExecutorService();
         } else {
-            AtomicInteger atomicInteger = new AtomicInteger(1);
-            executorService = new ForkJoinPool(i, pool -> {
-                ForkJoinWorkerThread forkJoinWorkerThread = new ForkJoinWorkerThread(pool) {
+            executorService = new java.util.concurrent.ThreadPoolExecutor(i, i,0L, TimeUnit.MILLISECONDS, new java.util.concurrent.LinkedBlockingQueue<>(), target -> new io.papermc.paper.util.ServerWorkerThread(target, s, priorityModifier));
+        }
+        /*
                     @Override
                     protected void onTermination(Throwable throwable) {
                         if (throwable != null) {
@@ -168,6 +197,7 @@
                 return forkJoinWorkerThread;
             }, Util::onThreadException, true);
         }
+        }*/ // Paper end - Perf: use simpler thread pool
 
         return executorService;
     }
@@ -935,16 +965,7 @@
         }
 
         public void openUrl(URL url) {
-            try {
-                Process process = AccessController.doPrivileged(
-                    (PrivilegedExceptionAction<Process>)(() -> Runtime.getRuntime().exec(this.getOpenUrlArguments(url)))
-                );
-                process.getInputStream().close();
-                process.getErrorStream().close();
-                process.getOutputStream().close();
-            } catch (IOException | PrivilegedActionException var3) {
-                Util.LOGGER.error("Couldn't open url '{}'", url, var3);
-            }
+            throw new IllegalStateException("This method is not useful on dedicated servers."); // Paper - Fix warnings on build by removing client-only code
         }
 
         public void openUri(URI uri) {
