]> jfr.im git - irc/unrealircd/unrealircd-webpanel.git/commitdiff
Fix CPU usage issue.
authorBram Matthys <redacted>
Fri, 5 May 2023 12:36:08 +0000 (14:36 +0200)
committerBram Matthys <redacted>
Fri, 5 May 2023 12:36:08 +0000 (14:36 +0200)
js/unrealircd-admin.js

index 9f6ab5e6e0cbeb05308eadb3984cd71321a31787..15a2e1c54ba3af3ea6e05a6d4b5681e4c59cda7c 100644 (file)
@@ -151,16 +151,18 @@ function NewLogEntry(e)
 
     if (data.sync_option != "sync_now")
     {
-        raw = data;
-        delete raw.sync_option;
+        var sync = (data.sync_option == "no_sync") ? false : true;
+        delete data.sync_option;
+
         data_list_table.row.add({
             'Time':data.timestamp,
             'Level':data.level,
             'Subsystem':data.subsystem,
             'Event':data.event_id,
             'Message':data.msg,
-            'Raw':raw});
-        if (data.sync_option == "no_sync")
+            'Raw':data});
+
+        if (!sync)
             return;
     }
     data_list_table.draw(true);