Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8062393

Caching code with optimistic.types=true and --lazy-compilation=true generate more code than with --lazy-compilation=false

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Won't Fix
    • Icon: P3 P3
    • 8u40
    • 8u40, 9
    • core-libs
    • None
    • jdk8u40

      I am not sure, but this situation is not right,
      In documentation :
      Use lazy code generation strategies - do not compile the entire script at once.
      I ran simple script (nashorn/test/examples/array-micro.js) :

      $ jjs --persistent-code-cache=true --lazy-compilation=true --optimistic-types=true array-micro.js
      after :
      $ ls nashorn_code_cache | wc
           21 21 710

      remove nashorn_code_cache directory...

      $ jjs --persistent-code-cache=true --lazy-compilation=false --optimistic-types=true array-micro.js
      after :
      $ ls nashorn_code_cache | wc
       5 5 168

      for jdk9 it is reproduce too.


            hannesw Hannes Wallnoefer
            slugovoy Sergey Lugovoy (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: