Closed samth closed 4 years ago
yay!
First results of this investigation: marching-cubes.rkt
, the largest file (and marching-squares.rkt
) is generating an enormous amount of code using macros itself, not related to TR.
With the current master and Racket 7.7 (BC), only these files area above 200k (see the attached file for the full list).
202427 Jul 3 09:25 ./plot-lib/plot/private/plot3d/compiled/rectangle_rkt.zo (was 265266)
206196 Jul 3 09:25 ./plot-lib/plot/private/plot2d/compiled/point_rkt.zo (was 275701)
210551 Jul 3 09:25 ./plot-lib/plot/private/plot3d/compiled/contour_rkt.zo (was 2600980
221171 Jul 3 09:25 ./plot-lib/plot/private/plot3d/compiled/isosurface_rkt.zo (was 297586)
222475 Jul 3 09:25 ./plot-lib/plot/private/plot2d/compiled/interval_rkt.zo (was 292205)
222534 Jul 3 09:25 ./plot-lib/plot/private/plot2d/compiled/line_rkt.zo (was 304001)
226909 Jul 3 08:00 ./plot-lib/plot/private/common/compiled/ticks_rkt.zo
254227 Jul 3 09:25 ./plot-lib/plot/private/plot3d/compiled/plot-area_rkt.zo (was 247151)
275367 Jul 3 09:25 ./plot-lib/plot/private/plot2d/compiled/decoration_rkt.zo (was 353862)
313260 Jul 3 09:24 ./plot-lib/plot/private/common/compiled/parameters_rkt.zo (was 307592)
In addition, the 837kb marching-cubes_rkt.zo is now 133kb.
Is this still an issue that is being worked on or can this issue be closed?
I have some long in-progress work that will further help here, but this doesn't need to be open any more.
Currently, many files in these packages have long compile times and very large zo file sizes, due to Typed Racket contract generation. This issue tracks reducing these problems.
In 6.11, here are the largest zo file sizes (all over 500k):
There are 49, and 29 are from various plot packages, including 2 of the 4 largest.
In a current (20180214-2e1a81b345) nightly snapshot, there is only one plot zo file over 500k, which is
plot-lib/plot/private/common/marching-cubes.rkt
and which is not large because of Typed Racket (changing totyped/racket/no-check
doesn't affect zo file size). These reductions are due to #31 and #27 among others (also a change by @rfindler toracket/contract
). Currently the largest zo sizes for plot are (all over 200k):My next steps are to investigate what can be done to shrink these.
cc @stamourv @mflatt @rfindler @bennn