Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Significant latency upon remote evaluation #2756

Closed
ErikPrantare opened this issue Jan 25, 2023 · 9 comments · Fixed by #2759
Closed

Significant latency upon remote evaluation #2756

ErikPrantare opened this issue Jan 25, 2023 · 9 comments · Fixed by #2759
Labels
ui/ux Nyxt User Interface: themes, appearance and usability.

Comments

@ErikPrantare
Copy link

ErikPrantare commented Jan 25, 2023

Describe the bug
When evaluating an expression with nyxt --remote --eval,
there is a significant delay on evaluation compared with evaluating through slime, for example.

Precise recipe to reproduce the issue

  • Start nyxt
  • Open multiple buffers
  • Ensure remote-execution-p is set to t
  • Run nyxt --remote --eval '(switch-buffer-next)' in a shell

Information

  • OS name+version: Guix 5e4ec8218142eee8e6e148e787381a5ef891c5b1
  • Graphics card and driver: Don't know
  • Desktop environment / Window manager name+version: StumpWM 22.05
  • How you installed Nyxt (Guix pack, package manager, build from source): guix package -i nyxt
  • Information from show-system-information:
Nyxt version: 2.2.4
Renderer version: GI-GTK
Operating system kernel: Linux 5.19.16-gnu
Lisp implementation: SBCL 2.2.11 (Dynamic space size: 3221225472)
Features: (:WEBKIT2 :WEBKIT2-2.36 :WEBKIT2-CORS-ALLOWLIST :WEBKIT2-PASTE-PLAINTEXT
 :WEBKIT2-TRACKING :WEBKIT2-MUTE :WEBKIT2-EMOJI :WEBKIT2-MEDIA
 :WEBKIT2-SANDBOXING :GTK-3-22 :GTK-3-20 :GTK-3-18 :GTK-3-16 :GTK-3-14
 :GTK-3-12 :GTK-3-10 :GTK-3-8 :GTK-3-6 :GTK-3-4 :GTK :GDK-3-22 :GDK-3-20
 :GDK-3-18 :GDK-3-16 :GDK-3-14 :GDK-3-12 :GDK-3-10 :GDK-3-8 :GDK-3-6 :GDK-3-4
 :CAIRO-1-10 :CAIRO-1-12 :GDK-PIXBUF :GLIB-2-30 :GLIB-2-32 :GLIB-2-34
 :GLIB-2-36 :GLIB-2-38 :GLIB-2-40 :GLIB-2-42 :GLIB-2-44 :GLIB-2-46 :GLIB-2-48
 :GLIB-2-50 :GLIB-2-52 :GLIB-2-54 :GLIB-2-56 :GLIB-2-58 :GLIB :NYXT-2
 :FSET-EXT-STRINGS :CUSTOM-HASH-TABLE-NATIVE :CLIPBOARD-CONTENT-METHOD :SWANK
 :PLUMP-UTF-32 :GLOBAL-VARS :PARENSCRIPT :NAMED-READTABLES :LPARALLEL
 :21BIT-CHARS :CHUNGA :FLEXI-STREAMS :CLOSER-MOP :CL-PPCRE-UNICODE :CL-UNICODE
 :CL-PPCRE :BORDEAUX-THREADS :LPARALLEL.WITH-CLTL2 :LPARALLEL.WITH-CAS
 :LPARALLEL.WITH-STEALING-SCHEDULER :SPLIT-SEQUENCE CHIPZ-SYSTEM:GRAY-STREAMS
 CFFI-FEATURES:FLAT-NAMESPACE CFFI-FEATURES:X86-64 CFFI-FEATURES:UNIX :CFFI
 CFFI-SYS::FLAT-NAMESPACE ALEXANDRIA::SEQUENCE-EMPTYP :FAST-IO-SV :FAST-IO
 :SBCL-USES-SB-ROTATE-BYTE :ASDF-SYSTEM-CONNECTIONS :CL-JSON-CLOS :CL-JSON
 :THREAD-SUPPORT :ASDF3.3 :ASDF3.2 :ASDF3.1 :ASDF3 :ASDF2 :ASDF :OS-UNIX
 :NON-BASE-CHARS-EXIST-P :ASDF-UNICODE :ARENA-ALLOCATOR :X86-64 :GENCGC :64-BIT
 :ANSI-CL :COMMON-LISP :ELF :IEEE-FLOATING-POINT :LINUX :LITTLE-ENDIAN
 :PACKAGE-LOCAL-NICKNAMES :SB-CORE-COMPRESSION :SB-LDB :SB-PACKAGE-LOCKS
 :SB-THREAD :SB-UNICODE :SBCL :UNIX)

ASDF version: 3.3.5
ASDF registries: (NYXT-SOURCE-REGISTRY ENVIRONMENT-SOURCE-REGISTRY USER-SOURCE-REGISTRY
                      USER-SOURCE-REGISTRY-DIRECTORY
                      DEFAULT-USER-SOURCE-REGISTRY SYSTEM-SOURCE-REGISTRY
                      SYSTEM-SOURCE-REGISTRY-DIRECTORY
                      DEFAULT-SYSTEM-SOURCE-REGISTRY)
Critical dependencies: (/gnu/store/xrr6jnmk88mpadwmx9mlkdydl3s0bwh2-sbcl-cl-cffi-gtk-0.11.2-2.e9a46df/share/common-lisp/sbcl/cl-cffi-gtk/gtk/cl-cffi-gtk.asd
 /gnu/store/w64c12i7y7vcc9vdys0wj4vyqq7vfch7-sbcl-cl-gobject-introspection-0.3-1.d0136c8/share/common-lisp/sbcl/cl-gobject-introspection/cl-gobject-introspection.asd
 /gnu/store/91y87sr1zr2qdaxk6cfzsib6792jbahj-sbcl-cl-webkit-3.5.6/share/common-lisp/sbcl/cl-webkit/webkit2/cl-webkit2.asd)

Guix version:

More discussion here:
https://discourse.atlas.engineer/t/evaluating-expressions-from-terminal-as-if-evaluated-from-the-window/621/5

@aartaka aartaka added the ui/ux Nyxt User Interface: themes, appearance and usability. label Jan 25, 2023
@Ambrevar
Copy link
Member

The slowdown is probably due to the config parsing. Try nyxt --failsafe --remote --eval, it should significantly speed up the process.

@Ambrevar
Copy link
Member

Actually... Is it ever useful to parse the config when --remote? Seems to me that the answer is no, since the command line args are not evaluated.

Thoughts? @aadcg @aartaka

@aartaka
Copy link
Contributor

aartaka commented Jan 26, 2023

Config is useless in this scenario, yes.

@aartaka
Copy link
Contributor

aartaka commented Jan 26, 2023

Well, maybe for socket position if it's redefined in the config file, but that's the forbidden magic we don't mess with here :)

@aadcg
Copy link
Member

aadcg commented Jan 26, 2023

I agree with the both of you!

@Ambrevar
Copy link
Member

Well, maybe for socket position if it's redefined in the config file, but that's the forbidden magic we don't mess with here :)

Not even that, because the socket path, like the config path, can only be tweaked via command-line arguments / environment variables.

@aartaka
Copy link
Contributor

aartaka commented Jan 26, 2023

Then we're absolutely safe to ignore the config when --remote --eval!

@Ambrevar
Copy link
Member

Ambrevar commented Jan 26, 2023

To do:

  • Report the socket path as log:info.
  • --failsafe should not disable the socket with --remote.
  • Document the above behaviour in nyxt --help.
  • Honor "Without --quit or --remote, the evaluation is done after parsing the config file".
  • Ensure that --eval can be specified multiple times.

@ErikPrantare
Copy link
Author

The slowdown is probably due to the config parsing. Try nyxt --failsafe --remote --eval, it should significantly speed up the process.

My version does not seem to have --failsafe, but --no-init --no-auto-config yield similar latency for me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ui/ux Nyxt User Interface: themes, appearance and usability.
Development

Successfully merging a pull request may close this issue.

4 participants