4

Is there a way to save HHVM bytecode as a file, since HHVM uses JIT bytecode compilation instead of compiling? If not, are there any alternatives for modern PHP versions (5.5,5.6)?

Daveman
  • 1,075
  • 9
  • 26
  • HUH? Save it as a file? Save what? The bytecode isn't compiled. It's just an intermediary representation... – ircmaxell Sep 12 '14 at 19:33
  • 1
    Well, technically, it's actually saved as a file: HHVM uses SQLite for caching HHBC. SQLite uses files for storing the mini-databases. This is the reason why you don't lose your cached bytecodes if you restart the computer. – Radu Murzea Sep 13 '14 at 06:06

1 Answers1

3

You can generate bytecode, which is saved in internal SQLite database and then switch on Repo.Authoritative mode, under which HHVM will only use bytecode from SQLite db and never touch source .php files. See http://hhvm.com/blog/4061/go-faster

Kristaps Kaupe
  • 216
  • 1
  • 3
  • Is there one Database for each project or are all projects stored in one database? – Daveman Sep 15 '14 at 06:00
  • Everything is in a single database. One way would be tu run separate HHVM instance for each project and then let the nginx or whatever webserver you use do the magic to pass FastCGI requests of each vhost / path to a different HHVM instance. – Kristaps Kaupe Sep 18 '14 at 15:34