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

Freezes when entering URL #3197

Closed
KikyTokamuro opened this issue Sep 30, 2023 · 14 comments
Closed

Freezes when entering URL #3197

KikyTokamuro opened this issue Sep 30, 2023 · 14 comments
Labels
bug prompt-buffer Related to the prompt buffer.

Comments

@KikyTokamuro
Copy link

Describe the bug

When entering the URL of a page or a search query via Ctrl-l or Alt-l, it freezes for a few seconds.
Appears every time you enter a URL or search query.

simplescreenrecorder-2023-09-26_17.17.21.mp4

Precise recipe to reproduce the issue

Press Ctrl-l or Alt-l and start typing your query.

Information

  • OS name+version: Fedora Linux 38 (Workstation Edition)
  • Graphics card and driver: Mesa Intel(R) HD Graphics 3000 (SNB GT2)
  • Desktop environment / Window manager name+version: i3 version 4.22 (2023-01-02)
  • How you installed Nyxt (Guix pack, package manager, build from source): https://copr.fedorainfracloud.org/coprs/kiky-tokamuro/Nyxt/ also appears on Flatpak
  • Information from show-system-information:
Nyxt version: 3.8.0
Renderer: GI-GTK
Operating system kernel: Linux 6.4.15-200.fc38.x86_64
Lisp implementation: SBCL 2.3.8-1.fc38 (Dynamic space size: 3221225472)
Features: (:NYXT-GI-GTK :NYXT-GTK :NYXT-GI-GTK :NYXT-GTK :NYXT-3.8 :NYXT-3 :NYXT-3.8.0
 :CLIPBOARD-CONTENT-METHOD :SWANK :SLYNK :PLUMP-UTF-32 :PARENSCRIPT :NSYMBOLS
 :FSET-EXT-STRINGS :SBCL+SAFE-STANDARD-READTABLE :NAMED-READTABLES :GLOBAL-VARS
 :CL-FAD :LPARALLEL :21BIT-CHARS :CUSTOM-HASH-TABLE-NATIVE :CL-PPCRE-UNICODE
 :CL-UNICODE :CL-JSON-DOUBLE-FLOAT-IS-SUBSUMED
 :CL-JSON-SINGLE-FLOAT-IS-SUBSUMED :CHUNGA :FLEXI-STREAMS :CL-PPCRE :WEBKIT2
 :WEBKIT-2.42.0 :WEBKIT-2.42 :WEBKIT-2 :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 :CLOSER-MOP :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
 :BORDEAUX-THREADS :LPARALLEL.WITH-CLTL2 :LPARALLEL.WITH-CAS
 :LPARALLEL.WITH-STEALING-SCHEDULER :SPLIT-SEQUENCE
 CFFI-FEATURES:FLAT-NAMESPACE CFFI-FEATURES:X86-64 CFFI-FEATURES:UNIX :CFFI
 CFFI-SYS::FLAT-NAMESPACE ALEXANDRIA::SEQUENCE-EMPTYP :FAST-IO-SV :FAST-IO
 :CL-JSON-CLOS :CL-JSON :SBCL-USES-SB-ROTATE-BYTE CHIPZ-SYSTEM:GRAY-STREAMS
 :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.1
ASDF registries: (NYXT-SOURCE-REGISTRY ENVIRONMENT-SOURCE-REGISTRY)
Critical dependencies: (/builddir/build/BUILD/nyxt-3.8.0/_build/cl-cffi-gtk/gtk/cl-cffi-gtk.asd
 /builddir/build/BUILD/nyxt-3.8.0/_build/cl-gobject-introspection/cl-gobject-introspection.asd
 /builddir/build/BUILD/nyxt-3.8.0/_build/cl-webkit/webkit2/cl-webkit2.asd)
  • Nyxt version (from the nyxt-version command or nyxt --version from a shell): Nyxt version 3.8.0
  • Lisp implementation/version (if built from source): SBCL 2.3.8-1.fc38
  • Kernel name+version: 6.4.15-200.fc38.x86_64
  • WebKitGTK+ | QtWebEngine version: 2.42.0-1.fc38

Output when started from a shell

Nyxt version 3.8.0
<INFO> [18:56:05] Source location: #P"/usr/share/nyxt/"
<INFO> [18:56:05] Loading Lisp file #P"/home/kiky/.config/nyxt/config.lisp".
<INFO> [18:56:05] Listening to socket: #P"/run/user/1000/nyxt/nyxt.socket"
<INFO> [18:56:07] Loading #P"/home/kiky/.local/share/nyxt/history/default.lisp".
<INFO> [18:56:07] Restoring 1 buffer from history.
<INFO> [18:56:07] Loading #P"/home/kiky/.local/share/nyxt/auto-rules.lisp".
<INFO> [18:56:10] Loading #P"/home/kiky/.local/share/nyxt/bookmarks.lisp".
@aadcg
Copy link
Member

aadcg commented Sep 30, 2023

I think it's due to the call to input->queries that fetches search engine suggestions in prompter:filter-postprocessor. Maybe it's possible to make it more efficient but, regardless, there should be (1) a mechanism that only triggers it given that a certain minimum of characters has been inserted and (2) an upper bound of time to wait for the return values of input->queries given that the internet connection may be slow.

@aadcg aadcg added bug prompt-buffer Related to the prompt buffer. labels Oct 4, 2023
@wvstolzing
Copy link

I think the issue mentioned in pull request #2998 is also at work here. I've been using the development build compiled over sbcl on Debian 12 as well as Fedora 38; & have the exact same problem.

@aadcg
Copy link
Member

aadcg commented Oct 10, 2023

@wvstolzing I don't think that's related.

Could one of you test the command set-url with the following patch applied (buffer.lisp)?

 (define-class new-url-or-search-source (prompter:source)
   ((prompter:name "New URL or search query")
-   (prompter:filter-preprocessor
-    (lambda (suggestions source input)
-      (declare (ignore suggestions source))
-      (input->queries input
-                      :check-dns-p nil
-                      :engine-completion-p nil)))
    (prompter:filter nil)
-   (prompter:filter-postprocessor
-    (lambda (suggestions source input)
-      (declare (ignore suggestions source))
-      (input->queries input
-                      :check-dns-p t
-                      :engine-completion-p t)))
    (prompter:actions-on-return #'buffer-load*))
   (:export-class-name-p t)
   (:documentation "This prompter source tries to \"do the right thing\" to

If the issue is gone, then it's due to input->queries as I've pointed out and #2998 is unrelated.

It's hard for me to reproduce the issue you're facing. Theoretically, throttling the network bandwidth could show it.

@apsinthium
Copy link

I, too, have this issue. I have commented out the lines you specified in buffer.lisp and ran set-url, but the lagging still persists. Sometimes, if I type too quickly, then the entire application freezes and I have to force quit. I'm on Debian 13 (Trixie/sid) and using Nyxt 3.9.0 (Flatpak).

@jmercouris
Copy link
Member

Thank you for your reports, we will investigate!

@dimitar-petrov
Copy link

I am having the same issue.

@aadcg
Copy link
Member

aadcg commented Nov 5, 2023

@dimitar-petrov do you have a recipe to reproduce it? I'm still unable to reproduce it.

@apsinthium
Copy link

I'm just updating that I do not have this particular problem on the arch version of Nyxt, but I did experience it on Debian using the Flatpak release.

@aadcg
Copy link
Member

aadcg commented Nov 5, 2023

@apsinthium that could indicate that it is related to the renderer since the version of WebKitGTK on Arch and Flatpak differ.

@wvstolzing
Copy link

Not sure if at all helpful or relevant, but I tried to make a screen capture of a typical attempt to 'open url' under Nyxt: https://youtu.be/4jiZm0nJ_Ko

I'm trying to hit <C-l>; then type lemmy.ml. At the start I make a typo; by the time I correct it, the browser has taken me to the search.atlas.engineer page for the mis-typed bit of text.

@aadcg
Copy link
Member

aadcg commented Nov 5, 2023

@wvstolzing thanks for the recording. Unfortunately, I can't reproduce it.

The issue you face seems related to the network speed. Did you try my suggestion above?

@KonstantinDjairo
Copy link

this also happens to me, but specially when there are more than 4 tabs open

@jannndo
Copy link

jannndo commented Feb 6, 2024

the same here. unable to open even one tab

@aadcg
Copy link
Member

aadcg commented Feb 7, 2024

This issue is a duplicate of #2134.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug prompt-buffer Related to the prompt buffer.
Development

No branches or pull requests

8 participants