On my Windows XP machines (one is a standard installation, the other a
highly tweaked system), I noticed a considerable timeout for the web
browser to appear when `fossil ui` is invoked.

The delay seems to origin from StartServiceCtrlDispatcherW(), called
from win32_http_service() [0] inside cmd_webserver() [1], the latter
of which handling both the `fossil ui` and `fossil server` commands.
The timeout occurs regardless of whether the Fossil service (`fossil
winsrv`) is started, stopped, or not registered at all. Modifying the
`ServicesPipeTimeout` registry setting [2] as an attempt to have
StartServiceCtrlDispatcherW() abort earlier has no effect.

[0] http://fossil-scm.org/index.html/artifact/a3970bdc0b?ln=642-669
[1] http://fossil-scm.org/index.html/artifact/5105d4bc1b?ln=2532
[2] https://support.microsoft.com/en-us/kb/922918

Each new `fossil ui` server that is not able to bind to the default
port 8080 takes the next available port. This is also true if the
Fossil service (`fossil winsrv`) is up and running, in this case
`fossil ui` (or `fossil server`) brings up a new server listening to a
new port. So these facilities do not seem to be linked, i.e. the
`winsrv` service does not seem to be "recycled" for the `ui` and
`server` commands. Also, the comment to win32_http_service() [3]
states that if Fossil was running in a interactive console session,
the routine would fail, and if I get it right, this is most likely
true if Fossil is run with either the `ui` or `server` command. So I
would like to suggest to only issue the win32_http_service() call from
cmd_webserver() if `isUiCmd` evaluates to false. Maybe the checks can
be omitted entirely, so that `fossil server` will be unlinked from
waiting for `fossil winsrv` as well.

[3] http://fossil-scm.org/index.html/artifact/a3970bdc0b?ln=637-640

Do you think this makes sense, and could be changed in Fossil? Or am I
missing something important?

A patched version works fine on Windows XP, the web browser shows up
instantly. I've seen no problems on Windows 7 and Windows 10 with the
modified version, so far.

A workaround for me is to start `fossil ui` only once in a separate
console (preferably with a repository name indicated, so closing the
repository won't interfere with the server) and leave it running in
the background, then switch to the web browser and hit F5 as necessary
each time I want to see new check-ins. But running `fossil ui` from
the command line is a lot more straightforward, as it navigates
directly to the current check-in, without the need to switch windows
and refresh pages.

I must admit, submitting change requests for Windows XP may seem a
little odd, I agree, but it's the wide availability of Fossil that
helps me archiving my projects from my old PCs, to be able to move on,
one day, maybe.

--Florian
_______________________________________________
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users

Reply via email to