Hi there,
I have now repeated the Chmutov test under WSL/Linux with a fresh cache
name, so this time I captured the actual initial calculation.
The result was:
implicit mesh:
3,096,000 vertices
1,032,000 triangles
mesh generation: 5.934 seconds
triangle rendering: 0.381 seconds
MetaPost total: 6.468 seconds
ConTeXt runtime: 6.294 seconds
Measured with /usr/bin/time -v, the complete command took:
wall-clock time: 6.35 seconds
maximum resident set size: 399,644 kB
CPU usage: 106%
exit status: 0
The log reports a z-buffer of 1184 × 1184 pixels with supersampling 2,
and about 594 MB of temporary memory cleaned up afterwards.
So the overall result on this Ryzen 5 5600 under WSL is almost identical
to your reported 6.277 seconds for the initial run.
See log file attached.
JP
Le 29/07/2026 à 17:19, Hans Hagen via ntg-context a écrit :
On 7/29/2026 4:42 PM, Jim Diamond via ntg-context wrote:
On Wed, Jul 29, 2026 at 13:57 (+0200), Jean-Pierre Delange via
ntg-context wrote:
2.
One internal cross-reference remains unresolved in the 3D document.
I notice that luametafun-threed.tex has
reference=fig:threed:process:2,
*twice*, once on like 513 and once on line 524.
I'd hate to go out on a limb and say this is the problem, but I'm
suspicious. 🙂
indeed, so now that you joined the testing:
\startMPpage
lmt_scene_start [
width = 10cm,
resolution = 150,
supersample = 2,
crop = true,
projection = "perspective",
light = (0,-1,-2),
eye = (20,20,20),
target = (0,0,0),
up = (0,0,1),
intensity = 1.1,
cache = true,
name = "example",
] ;
lmt_scene_material [
name = "surface",
diffuse = (.9,.6,.2),
specular = (.5,.5,.5),
shininess = 25,
opacity = 1,
ambient = .25,
] ;
lmt_scene_implicit [
id = "chmutov",
code = "32*(x*x*x*x*x*x + y*y*y*y*y*y + z*z*z*z*z*z) -
48*(x*x*x*x + y*y*y*y + z*z*z*z) + 18*(x*x + y*y + z*z) - 3",
dfdx = "192*x*x*x*x*x - 192*x*x*x + 36*x",
dfdy = "192*y*y*y*y*y - 192*y*y*y + 36*y",
dfdz = "192*z*z*z*z*z - 192*z*z*z + 36*z",
xmin = -1.3,
xmax = 1.3,
ymin = -1.3,
ymax = 1.3,
zmin = -1.3,
zmax = 1.3,
nx = 150,
ny = 150,
nz = 150,
material = "surface",
normal = "smooth",
] ;
lmt_scene_stop ;
\stopMPpage
Needs 6.277 for the initial run (5.866 metapost) .. only a million
triangles and three times that on vertices. Kind of deep nested
z-buffering here (some 1100 x 1100 pixels downsampled to 550x550 anti
aliased). I bet that on this silicon graphics machine of your past it
took more time but maybe not.
Hans
resolvers | formats | executing runner 'run luametatex format':
/home/adeimantos/context2026-29-07-wsl/tex/texmf-linux-64/bin/luametatex
--jobname="./chmutov-test.tex" --socket --shell-escape
--fmt=/home/adeimantos/context2026-29-07-wsl/tex/texmf-cache/luametatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/formats/luametatex/cont-en.fmt
--lua=/home/adeimantos/context2026-29-07-wsl/tex/texmf-cache/luametatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/formats/luametatex/cont-en.lui
--c:currentrun=1 --c:fulljobname="./chmutov-test.tex"
--c:input="./chmutov-test.tex" --c:kindofrun=1 --c:maxnofruns=9
--c:texmfbinpath="/home/adeimantos/context2026-29-07-wsl/tex/texmf-linux-64/bin"
system >
system > ConTeXt ver: 2026.07.29 11:46 LMTX fmt: 2026.7.29 int:
english/english
system >
system > 'cont-new.mkxl' loaded
open source > level 1, order 1, name
'/home/adeimantos/context2026-29-07-wsl/tex/texmf-context/tex/context/base/mkxl/cont-new.mkxl'
system > beware: some patches loaded from cont-new.mkxl
close source > level 1, order 1, name
'/home/adeimantos/context2026-29-07-wsl/tex/texmf-context/tex/context/base/mkxl/cont-new.mkxl'
system > files > jobname './chmutov-test', input './chmutov-test.tex',
result './chmutov-test'
fonts > latin modern fonts are not preloaded
languages > language 'en' is active
open source > level 1, order 2, name './chmutov-test.tex'
system > auto \starttext ... \stoptext
fonts > preloading latin modern fonts (second stage)
fonts > 'fallback modern rm 12pt' is loaded
metapost > initializing instance 'metafun:1' using format 'metafun' and
method 'double'
metapost > loading 'metafun' as
'/home/adeimantos/context2026-29-07-wsl/tex/texmf-context/metapost/context/base/mpxl/metafun.mpxl'
using method 'double'
metapost > initializing number mode 'double'
metapost > trace > This is MPLIB for LuaMetaTeX, version 3.15, running
in double mode.
metapost > trace >
metapost > trace > loading metafun for lmtx, including the plain 1.004
base definitions
resolvers > lua > loading file
'/home/adeimantos/context2026-29-07-wsl/tex/texmf-context/tex/context/base/mkxl/mlib-thr.lmt'
succeeded
metapost > trace >
resolvers > lua > loading file
'/home/adeimantos/context2026-29-07-wsl/tex/texmf-context/tex/context/base/mkxl/mlib-lsy.lmt'
succeeded
metapost 3D > implicit mesh: 3096000 vertices, 1032000 triangles, runtime
5.934
metapost 3D > unprojected dimensions: x [-1.023931847 1.023931847], y
[-1.023931847 1.023931847], width 2.047863695, height 2.047863695
metapost 3D > zbuffer width 1184, height 1184, supersample 2
metapost 3D > 1 1 : triangles : implicit, opacity 1.000, id 'chmutov',
runtime 0.381
metapost 3D > cropping: xmin 47, ymin 16, xmax 546, ymax 575, width 500,
height 560, runtime 0.012
metapost 3D > trying to clean up 593.638.928 bytes of memory
pages > flushing realpage 1, userpage 1, subpage 1
close source > level 1, order 2, name './chmutov-test.tex'
backend > xmp > using file
'/home/adeimantos/context2026-29-07-wsl/tex/texmf-context/tex/context/base/mkiv/lpdf-pdx.xml'
mkxl run stats > used config file: selfautoparent:/texmf/web2c/texmfcnf.lua
mkxl run stats > used cache path:
/home/adeimantos/context2026-29-07-wsl/tex/texmf-cache/luametatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e
mkxl run stats > resource resolver: loadtime 0.003 seconds, 0 scans with
scantime 0.000 seconds, 0 shared scans, 40 found files, scanned paths: <none>
mkxl run stats > stored bytecode data: 531 modules (0.138 sec), 106 tables
(0.008 sec), 637 chunks (0.147 sec)
mkxl run stats > traced context lua functions: maxstack: 1911, freed: 2,
unreachable: 1909
mkxl run stats > cleaned up reserved nodes: 80 nodes, 7 lists of 445
mkxl run stats > node memory usage: 12 attribute, 6 attributelist, 6 fontspec,
3 glue, 135 gluespec, 1 kern, 661 mathspec, 4 penalty, 55 specification, 2 temp
mkxl run stats > node list callback tasks: 17 unique task lists, 10 instances
(re)created, 29 calls
mkxl run stats > used backend: pdf
mkxl run stats > randomizer: resumed with value 0.21223313083991291
mkxl run stats > jobdata time: 0.001 seconds saving, 0.000 seconds loading
mkxl run stats > callbacks: file: 91, saved: 50, direct: 4, function: 714,
value: 428, message: 0, bytecode: 637, late 0, total: 1924 (1924 per page)
mkxl run stats > loaded patterns: en::1, load time: 0.000
mkxl run stats > loaded fonts: 3 files: latinmodernmathcompanion-regular.otf,
latinmodern-math.otf, lmroman10-regular.otf
mkxl run stats > font engine: otf 3.150, afm 1.541, tfm 1.000, 5 instances, 2
shared in backend, 2 common vectors, 0 common hashes, load time 0.043 seconds
mkxl run stats > metapost: 6.468 seconds, loading: 0.024, execution: 6.456, n:
3, average: 4.316, instances: 1, luacalls: 16452 (file: 15976, text: 0, script:
456, log: 20), memory: 0.000 M
mkxl run stats > math tweaking time: 0.015 seconds, 6 math goodie tables
mkxl run stats > result saved in file: chmutov-test.pdf, compresslevel 1,
objectcompresslevel 3, 3 streams, 1 uncompressed, 0 compressed, 2 not
compressed, threshold 40
mkxl run stats > positions: 4 collected, 0 deltas, 0 shared partials, 0
partial entries
mkxl run stats > used platform: linux-64, type: unix, binary subtree:
texmf-linux-64
mkxl run stats > used engine: luametatex version: 2.11.09, functionality
level: 20260727, format id: 731, memory mode: 1, compiler: gcc, cversion: 23
mkxl run stats > tex properties: 495867 eqtb slots used of 2097152, 54272
control sequences, 262144 hash slots, 5335 misses, approximate memory usage:
112 MB
mkxl run stats > lua properties: engine: lua 5.5, format 6, used memory: 51
MB, ctx: 49 MB, max: 54 MB, symbol mask: utf (τεχ)
mkxl run stats > runtime: 6.294 seconds, 1 processed pages, 1 shipped pages,
0.159 pages/second
system | total runtime: 6.325 seconds of 6.357 seconds
Command being timed: "context chmutov-test.tex"
User time (seconds): 6.53
System time (seconds): 0.23
Percent of CPU this job got: 106%
Elapsed (wall clock) time (h:mm:ss or m:ss): 0:06.35
Average shared text size (kbytes): 0
Average unshared data size (kbytes): 0
Average stack size (kbytes): 0
Average total size (kbytes): 0
Maximum resident set size (kbytes): 399644
Average resident set size (kbytes): 0
Major (requiring I/O) page faults: 0
Minor (reclaiming a frame) page faults: 1255
Voluntary context switches: 5
Involuntary context switches: 18
Swaps: 0
File system inputs: 0
File system outputs: 784
Socket messages sent: 0
Socket messages received: 0
Signals delivered: 0
Page size (bytes): 4096
Exit status: 0
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the
Wiki!
maillist : [email protected] /
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___________________________________________________________________________________