Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gen_service: change code generation strategy to avoid big switches #114

Merged

Conversation

gasche
Copy link
Contributor

@gasche gasche commented Jan 2, 2018

See #106: the gigantic
pattern-matching in the code generated by gen_service.ml hit code
generation bug on ARM backends.

The new code only generate large arrays (these could easily be split
if further issues were reported), and uses dichotomic search on sorted
array to map services to ports and conversely.

On my (x86_64) machine, build time changes from 45s to 4.5s.

See mirage#106: the gigantic
pattern-matching in the code generated by gen_service.ml hit code
generation bug on ARM backends.

The new code only generate large arrays (these could easily be split
if further issues were reported), and uses dichotomic search on sorted
array to map services to ports and conversely.

On my (x86_64) machine, build time changes from 45s to 4.5s.
@avsm
Copy link
Member

avsm commented Jan 2, 2018

Thanks! Restarted failed build

@gasche
Copy link
Contributor Author

gasche commented Jan 2, 2018

The error is the same as for #113, there seems to be an error in the ubuntu package database (the package that the CI machines try to access indeed doesn't seem to exist anymore), this is not just a transient package-download error -- but it could be caused by a transient error in accessing updated package metadata.

@gasche
Copy link
Contributor Author

gasche commented Jan 10, 2018

@avsm gentle ping: I think the CI failure may be safely ignored here.

@avsm avsm merged commit a5e3165 into mirage:master Jan 11, 2018
avsm added a commit to mirage/opam-repository that referenced this pull request Jan 12, 2018
* Change code generation strategy to avoid big switches in
  the services file; improves build time by 10x (mirage/ocaml-uri#114 by @gasche).
* Remove deprecated function use (`String.lowercase`)
* Add development Makefile with more targets.
copy pushed a commit to copy/opam-repository that referenced this pull request Jan 17, 2018
* Change code generation strategy to avoid big switches in
  the services file; improves build time by 10x (mirage/ocaml-uri#114 by @gasche).
* Remove deprecated function use (`String.lowercase`)
* Add development Makefile with more targets.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants