9front - general discussion about 9front
 help / color / mirror / Atom feed
From: Jonas Amoson <jonas.amoson@gmail.com>
To: 9front@9front.org
Subject: [9front] Change of Hashsize in acid (slow startup on netsurf)
Date: Tue, 5 Jan 2021 14:10:09 +0200	[thread overview]
Message-ID: <CAF46DJ5Y9camL60fyeX8AR7_p+mBSdRHeVxXj2fSOGLip=wjUQ@mail.gmail.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 646 bytes --]

It is slow to debug netsurf with acid, as it takes a long time to load
all the symbols from the binary. It is the process of checking if a
symbol has been encountered before, the function unique(), that makes
the loading slow.

Changing Hashsize from 128 to 32768 in acid takes down the loading
time from 4 minutes to 8 seconds for me (45 times faster). Philippe
reported a similar speed increase (30x from 15 min to 30 sec).

I don't know if it is desirable to change the hashsize in the 9front
repo, as it probably is only netsurf that has so many symbols to load,
that it matters. But it might be that it doesn't harm anything either.

/Jonas

[-- Attachment #2.1: Type: text/plain, Size: 369 bytes --]

from postmaster@1ess:
The following attachment had content that we can't
prove to be harmless.  To avoid possible automatic
execution, we changed the content headers.
The original header was:

	Content-Type: application/octet-stream; name="acid.patch"
	Content-Disposition: attachment; filename="acid.patch"
	Content-Transfer-Encoding: base64
	Content-ID: <f_kjjy5yq10>

[-- Attachment #2.2: acid.patch.suspect --]
[-- Type: application/octet-stream, Size: 197 bytes --]

--- a/sys/src/cmd/acid/acid.h
+++ b/sys/src/cmd/acid/acid.h
@@ -3,7 +3,7 @@
 {
 	Eof		= -1,
 	Strsize		= 4096,
-	Hashsize	= 128,
+	Hashsize	= 32768,
 	Maxarg		= 512,
 	NFD		= 100,
 	Maxproc		= 50,

             reply	other threads:[~2021-01-05 12:13 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-05 12:10 Jonas Amoson [this message]
2021-01-05 21:03 ` Fwd: " hiro
2021-01-05 21:10   ` hiro
2021-01-05 22:16     ` Stanley Lieber
2021-01-05 22:39       ` hiro
2021-01-05 23:01         ` Stanley Lieber
2021-01-06  9:07           ` hiro
2021-01-06 15:23             ` Stanley Lieber
2021-01-06 16:23               ` hiro
2021-01-05 21:59 ` ori

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

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

  git send-email \
    --in-reply-to='CAF46DJ5Y9camL60fyeX8AR7_p+mBSdRHeVxXj2fSOGLip=wjUQ@mail.gmail.com' \
    --to=jonas.amoson@gmail.com \
    --cc=9front@9front.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.
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 NNTP newsgroup(s).