On Mon, Apr 18, 2016 at 4:03 AM, Asumu Takikawa <as...@ccs.neu.edu> wrote:
> On 2016-04-18 03:47:45 +0800, WarGrey Gyoudmon Ju wrote: > > And here is another question. Developing GUI Application involves > typed > > class system heavily, which makes the compiling time terribly long (if > > this is the root cause). > > It's possible that typed classes are slowing down typechecking, in > particular > typechecking methods can be slow. (I think this is in part because Typed > Racket has to fold over entire types, and class types can be large) > > The typechecker for classes actually has some performance logging (that's > disabled by default): > > > https://github.com/racket/typed-racket/blob/master/typed-racket-lib/typed-racket/typecheck/check-class-unit.rkt#L37 > > which you could try turning on to see what's slow. (you will have to > capture > the log output, e.g., by setting the PLTSTDERR environment variable) > > Also if you send me some self-contained code that's particularly slow to > typecheck I can look into it too. > > We don't have a global flag to turn off typechecking right now. I think the > best thing for us to do is to try to make TR faster. > That's worth expecting. The typed class system as a root cause is no more special other than its essential complexity, and the long-time-delays occur in these three situations every compiling: 1. It's glad to see typechecking methods is not the problem, and it's never longer than one second. racket: TR class time @ done: 136.580078125 racket: tr-timing: pass2 #false line #false at 124557 last step: 135 gc: 3 total: 1535 racket: tr-timing: pass2 timon/nefertimon.rkt line 75 at 124557 last step: 0 gc: 0 total: 1535 racket: tr-timing: Finished pass2 at 124557 last step: 0 gc: 0 total: 1535 racket: online-check-syntax: TR's tooltip syntaxes; this message is ignored racket: tr-timing: finished provide generation at 124667 last step: 110 gc: 0 total: 1645 racket: tr-timing: finished type checking at 124667 last step: 0 gc: 0 total: 1645 racket: tr-timing: Typechecking Done at 124667 last step: 0 gc: 0 total: 1645 racket: tr-timing: Removed provides at 124667 last step: 0 gc: 0 total: 1645 racket: tr-timing: Fixed contract ids at 124667 last step: 0 gc: 0 total: 1645 <delay occurs here every time> racket: tr-timing: Generated contracts at 135670 last step: 11003 gc: 427 total: 12648 racket: tr-timing: Starting optimizer at 135670 last step: 0 gc: 0 total: 12648 racket: tr-timing: Optimized at 135677 last step: 7 gc: 0 total: 12655 racket: tr-timing: Finished, returning to Racket at 135677 last step: 0 gc: 0 total: 12655 2. This takes the most time. module-prefetch: ((submod typed-racket/private/type-contract predicates) typed-racket/utils/utils typed-racket/utils/any-wrap typed-racket/utils/struct-type-c typed-racket/utils/opaque-object typed-racket/utils/evt-contract typed-racket/utils/sealing-contract typed-racket/utils/promise-not-name-contract typed-racket/utils/simple-result-arrow racket/sequence racket/contract/parametric) 3. The optimizer does the most tasks racket: optimizer: inlining #(flat-contract-predicate #<path:/opt/PLTracket/collects/racket/contract/private/misc.rkt> 870 0 29870 121 #false) size: 9 threshold: 96#<separator> in module <after this, the zo is written> pass[1]: compiling /Users/wargrey/Gyoudmon/ zuglag.com/nefertimon/digivice/nefertimon/nefertimon.rkt Anyway. Thank you, Asumu. -- 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.