9front - general discussion about 9front
 help / color / mirror / Atom feed
* [9front] Change of Hashsize in acid (slow startup on netsurf)
@ 2021-01-05 12:10 Jonas Amoson
  2021-01-05 21:03 ` Fwd: " hiro
  2021-01-05 21:59 ` ori
  0 siblings, 2 replies; 10+ messages in thread
From: Jonas Amoson @ 2021-01-05 12:10 UTC (permalink / raw)
  To: 9front

[-- 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,

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2021-01-06 16:29 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-05 12:10 [9front] Change of Hashsize in acid (slow startup on netsurf) Jonas Amoson
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

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).