unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Gavin Smith <gavinsmith0123@gmail.com>
To: "Ludovic Courtès" <ludo@gnu.org>
Cc: guix-devel@gnu.org, Texinfo <bug-texinfo@gnu.org>
Subject: Re: Any interest in using HTML for locally-installed Texinfo documentation?
Date: Tue, 15 Oct 2019 20:27:19 +0100	[thread overview]
Message-ID: <CAKPWYQ1KCUnZHGHL6pr49yASHzhyyGXHBMjoYQ8mVhPUjvfBLQ@mail.gmail.com> (raw)
In-Reply-To: <20190413162121.GA28137@darkstar.example.net>

Link to thread archive:
https://lists.gnu.org/archive/html/bug-texinfo/2019-04/msg00001.html

On Sat, Apr 13, 2019 at 5:18 PM Gavin Smith <gavinsmith0123@gmail.com> wrote:
> I've moved forward enough with Qt and QtWebEngine that I'm confident
> that it could be used for all the required features: path search for
> manuals and index search.  However, I'm not really happy with the hybrid
> architecture with one part of it in JavaScript, the other part in C++,
> communicating via a web socket.  (The JavaScript part itself
> is in two or three parts that send objects to each other via the "Message API"
> to evade browser security restrictions.)  It's an overly fiddly
> architecture.  I have found there is potential for race conditions to
> exist and also performance problems with JavaScript, especially when
> manipulating the DOM.  The existing JavaScript code is useful as a prototype,
> but I think really the entire thing should be written in one language,
> not two.  Apparently with QtWebKit applications had full access to the
> DOM from the C++ side, but with QtWebEngine you are forced to use
> JavaScript.

I'm replying to give an update on the current situation.

I haven't done any work on this in several months, so I will try to
remember the best I can.

I started another line of development, using the WebKitGTK engine.
http://git.savannah.gnu.org/cgit/texinfo.git/log/?h=webkitgtk-info

WebKitGTK seemed to be the best option for a lightweight embedded
web-browser. I looked into other options, such as the Gecko engine
used inside Thunderbird, but apparently it is not supported any more
to embed it in other programs. WebKitGTK allowed access to the DOM
tree of the documents without the complication of communicating with
embedded JavaScript, as was needed with QtWebEngine.

One annoyance is that there has to be a split architecture where the
DOM access has to be done in a separate process. Apparently this was
different in WebKitGTK version 1, but this was changed. One
recommended way around this is to communicate through dbus. I don't
know if we should depend on dbus, as I think a help system should
minimise dependencies (so you can still get help if your system is
borked). I implemented a Unix socket to pass data, although am not
sure how reliable my code is yet. Another option is to develop based
on WebKitGTK version 1 instead.

I found the documentation worse for GTK+ than for Qt and that it took
longer to get things working. However, compilation speed for C is much
faster, so trying to work things out by trial and error is less
painful. Also, running the program with valgrind showed many issues -
I don't know if this is my code's fault or a general issue with GTK+.
The GTK+ program integrated painlessly with an Automake build system,
whereas Qt code most naturally uses qmake (although qmake is quite
good and it doesn't appear that you are locked into using qmake or Qt
Designer in any way). The layout designer in Qt Designer appears to me
to be superior to Glade for GTK+, but I don't anticipate a need to
have complex widget layouts.

Text search is not implemented, but WebKitGTK does appear to have
special support for this, so it could be supported.

Texinfo 6.7 has been released which marks links to index pages with
the rel="index" attribute. This should make it easier to identify and
load the indices for a manual.

Start up time is an issue. The command-line "info" program starts up
almost instantaneously, whereas starting up a program with WebKitGTK
has a delay of a noticeable fraction of a second - even more so if
there is more than one WebKitGTK instance (for example, to load
indices in the background). I tend to start and stop many "info"
processes freely, rather than keeping the same process running all the
time. There is probably not much that can be done here.

I may be able to get an initial prototype that other people could try
ready in a few days. As ever, if anyone is interested in helping
with/taking over this project, please let me know.

  parent reply	other threads:[~2019-10-15 19:27 UTC|newest]

Thread overview: 44+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-01 12:55 Any interest in using HTML for locally-installed Texinfo documentation? Gavin Smith
2019-04-01 14:01 ` sirgazil
2019-04-02  9:37 ` Ludovic Courtès
2019-04-02 15:02   ` Gavin Smith
2019-04-02 16:46     ` Per Bothner
2019-04-07 16:28       ` Gavin Smith
2019-04-08 15:12         ` Ludovic Courtès
2019-04-08 15:39           ` Pierre Neidhardt
2019-04-08 23:46           ` Gavin Smith
2019-04-09  6:25             ` Eli Zaretskii
2019-04-13 16:21           ` Gavin Smith
2019-04-14 19:25             ` Pronaip
2019-10-15 19:27             ` Gavin Smith [this message]
2019-10-15 20:20               ` P
2019-10-15 20:35                 ` Gavin Smith
2019-10-15 20:40                 ` Per Bothner
2019-10-15 21:00                   ` Gavin Smith
2019-10-15 21:09                     ` Per Bothner
2019-10-15 21:30                       ` Gavin Smith
2019-10-16  1:39               ` Ricardo Wurmus
2019-10-19 20:31               ` Ludovic Courtès
2019-10-22 19:00                 ` Gavin Smith
2019-10-22 20:18                   ` Gavin Smith
2019-11-03 14:04                   ` Ludovic Courtès
2019-11-03 15:37                     ` Gavin Smith
2019-11-06 21:49                       ` Ludovic Courtès
2019-04-03 21:21     ` Ludovic Courtès
2019-04-04 10:33       ` Gavin Smith
2019-04-02 15:31   ` Per Bothner
2019-04-03 21:11     ` Ludovic Courtès
2019-04-03 22:44       ` Per Bothner
2019-04-04 10:23       ` Gavin Smith
2019-04-04 16:02         ` Ludovic Courtès
2019-04-02 20:12   ` Ricardo Wurmus
2019-04-02 20:27     ` Ricardo Wurmus
2019-04-02 22:58       ` sirgazil
2019-04-02 22:10     ` Per Bothner
2019-04-02 23:09       ` sirgazil
2019-04-03  8:43         ` Gavin Smith
2019-04-03 14:23           ` sirgazil
2019-04-03 14:40             ` Per Bothner
2019-04-03 14:49       ` Ricardo Wurmus
2019-04-02 21:02 ` George Clemmer
2019-04-07 11:08   ` Gavin Smith

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAKPWYQ1KCUnZHGHL6pr49yASHzhyyGXHBMjoYQ8mVhPUjvfBLQ@mail.gmail.com \
    --to=gavinsmith0123@gmail.com \
    --cc=bug-texinfo@gnu.org \
    --cc=guix-devel@gnu.org \
    --cc=ludo@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).