Folks, I’ve raised PR “request-structs.rkt : don’t need all of net/url #7” on racket/web-server . Please could someone look at it for me?
When I want to use a serialized continuations in sandboxes, I need to use the language web-server/lang/base, which performs the transformations necessary for the serializable-continuations. web-server/lang/base transitively requires: abort-resume manager request-structs net/url The ‘net/url’ requirement brings in http-client and url-connect; which between them bring in such fun stuff as: gunzip and openssl as well as http. If request-structs.rkt includes ‘net/url-structs’ instead, then we get a much reduced collection of modules. This takes the memory footprint of an empty (as can be) sandbox from: 9.21875 MB (with net/url) to 5.46875 MB (with net/url-structs) (See “find-sandbox-min-memory” below my signature, and please excuse the hyper precision). Thanks, Tim Brown ---------------------------------------------------------------------- (define (find-sandbox-min-memory lower upper rv iterations) (cond [(zero? iterations) rv] [else (define trial (* (+ lower upper) 0.5)) (printf "attempt ~a:" trial) (with-handlers ((exn:fail? (λ (x) (printf " too low: ~s~%" x) (find-sandbox-min-memory trial upper rv (sub1 iterations))))) (parameterize ([sandbox-eval-limits (list 60 trial)]) (make-evaluator 'web-server/lang/base '(void))) (displayln " too high?") (find-sandbox-min-memory lower trial trial (sub1 iterations)))])) (find-sandbox-min-memory 5 20 #f 5) ---------------------------------------------------------------------- -- Tim Brown CEng MBCS <tim.br...@cityc.co.uk> ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ City Computing Limited · www.cityc.co.uk City House · Sutton Park Rd · Sutton · Surrey · SM1 2AE · GB T:+44 20 8770 2110 · F:+44 20 8770 2130 ──────────────────────────────────────────────────────────────────────── City Computing Limited registered in London No:1767817. Registered Office: City House, Sutton Park Road, Sutton, Surrey, SM1 2AE VAT No: GB 918 4680 96 -- You received this message because you are subscribed to the Google Groups "Racket Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to racket-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.