]> Sergey Matveev's repositories - public-inbox.git/blobdiff - HACKING
doc: HACKING: add a bit about faster testing
[public-inbox.git] / HACKING
diff --git a/HACKING b/HACKING
index 666d504e7336b61ef7d26f559e5b192c56fbd9de..74a3096f5318749f547b28c6f4ba784ebc0acfed 100644 (file)
--- a/HACKING
+++ b/HACKING
@@ -32,7 +32,7 @@ may be too difficult to upgrade due to resource demands.
 Only depend on Free Software packages which exist in the "main"
 section of Debian "stable" distribution.  That is Debian 9.x
 ("stretch") as of this writing, but "oldstable" (8.x, "jessie")
-remains supported for v1 repositories.
+remains supported for v1 inboxes.
 
 In general, we favor mature and well-tested old things rather than
 the shiny new.
@@ -43,6 +43,11 @@ distribute and verify.  public-inbox itself will only be implemented
 in scripting languages (currently Perl 5) and optional JIT-compiled C
 (via Inline::C)
 
+Do not recurse on user-supplied data.  Neither Perl or C handle
+deep recursion gracefully.  See lib/PublicInbox/SearchThread.pm
+and lib/PublicInbox/MsgIter.pm for examples of non-recursive
+alternatives to previously-recursive algorithms.
+
 Performance should be reasonably good for server administrators, too,
 and we will sacrifice features to achieve predictable performance.
 Encouraging folks to self-host will be easier with lower hardware
@@ -51,6 +56,27 @@ requirements.
 See design_www.txt and design_notes.txt in the Documentation/
 directory for design decisions made during development.
 
+See Documentation/technical/ in the source tree for more details
+on specific topics, in particular data_structures.txt
+
+Faster tests
+------------
+
+The `make test' target provided by MakeMaker does not run in
+parallel.  Our `make check' target supports parallel runs, and
+it also creates a `.prove' file to optimize `make check-run'.
+
+The prove(1) command (distributed with Perl) may also be used
+for finer-grained testing: prove -bvw t/foo.t
+
+If using a make(1) (e.g. GNU make) with `include' support, the
+`config.mak' Makefile snippet can be used to set environment
+variables such as PERL_INLINE_DIRECTORY and TMPDIR.
+
+With PERL_INLINE_DIRECTORY set to enable Inline::C support and
+TMPDIR pointed to a tmpfs(5) mount, `make check-run' takes 6-10s
+(load-dependent) on a busy workstation built in 2010.
+
 Perl notes
 ----------