Let's review this version.

Tested with image generation, no problems.

"buildHtMacroTable" is before "spadStartUpMsgs", so even if the
warning message is printed, it is printed before banner.

- Qian

diff --git a/src/doc/Makefile.in b/src/doc/Makefile.in
index e968affd..19333585 100644
--- a/src/doc/Makefile.in
+++ b/src/doc/Makefile.in
@@ -255,7 +255,6 @@ GEN_HTFILES = xmpexp coverex gloss
 # The reason for this delayed execution is that generation of the .xpm
 # files in *.VIEW/ without the xvfb-run program will pop up image
 # windows in X and will make working during compilation impossible.
-# The intro.htex and util.ht files are not relevant for image generation.
 VIEWPORTFILES = coverex \
$(shell grep -lRe 'graphpaste{\|spadgraph{' ${srcdir}/ht/* ${srcdir}/htex/* \
           | sed 's,.*/,,;s,\..*,,' \
diff --git a/src/interp/htcheck.boot b/src/interp/htcheck.boot
index e3f78805..47fa0253 100644
--- a/src/interp/htcheck.boot
+++ b/src/interp/htcheck.boot
@@ -125,5 +125,3 @@ spadSysBranch(tree,arg) == --tree is (msg kind TREEorSomethingElse ...)
   kind = 'INTEGER  => INTEGERP arg
   kind = 'FUNCTION => atom arg
   systemError '"unknown tree branch"
-
-buildHtMacroTable()
diff --git a/src/interp/i-toplev.boot b/src/interp/i-toplev.boot
index 20b4773c..0b2250b0 100644
--- a/src/interp/i-toplev.boot
+++ b/src/interp/i-toplev.boot
@@ -94,6 +94,7 @@ interpsys_restart() ==
   loadExposureGroupData()
   initHist()
   initializeInterpreterFrameRing()
+  buildHtMacroTable()

   if $displayStartMsgs then spadStartUpMsgs()
   $currentLine := nil


On 12/28/23 08:28, Waldek Hebisch wrote:
On Thu, Dec 28, 2023 at 08:09:05AM +0800, Qian Yun wrote:


On 12/28/23 07:31, Waldek Hebisch wrote:

But thinking about HyperDoc, I see another problem: FriCAS is
supposed to use current 'util.ht' not a cached copy from the
past.  Long ago Spad compiler was autoloaded and 'util.ht' was
read as a side effect.  Now all files are included in the
image and side effect take place during image build.  We should
defer call to 'buildHtMacroTable()', either do this at FriCAS
startup or on first use of ')compile' (I think it is used only
for compilation).

(7) -> )lisp (time (|buildHtMacroTable|))

Evaluation took:
   0.000 seconds of real time
   0.000511 seconds of total run time (0.000409 user, 0.000102 system)
   100.00% CPU
   1 form interpreted
   5,297,256 processor cycles
   159,104 bytes consed

Value = #<HASH-TABLE :TEST EQUAL :COUNT 271 {100240C353}>

So the performance is totally acceptable for us to run this function
at each startup.

"interpsys_restart" should be a good place to put it?

Yes.


--
You received this message because you are subscribed to the Google Groups "FriCAS - 
computer algebra system" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/fricas-devel/1a9cdf2f-1910-41fa-be4a-a08f112f5044%40gmail.com.

Reply via email to