-
Notifications
You must be signed in to change notification settings - Fork 38
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
Collapse Service #62
Collapse Service #62
Conversation
Ugliest ifdefs I have done in my life.
To reduce tax for bytebuffer loads, initialize batchtranslator only at one place.
Sane platform (non WASM) is default. This truly only hide-threads from compilation path and not switch unswitch pthreads (-lpthread).
WASM builds are now succeeding (once again, after breaking with WASM_HIDE_THREADS). Bergamot translator regression-tests: Simple tests: bergamot-translator-app (single thread), service-cli (multi-thread) - PASS
Speed test: 48 threads, 1M lines - PASS, no segfaults.
|
Can we also put the batch_translator inside the service? Nobody uses the batch translator by itself, as far as I can tell. |
I'm currently not in favour of this, as Kenneth told me this can be functions instead, I haven't strictly understood how that happens either. My idea is store the graph and translation-related components (data), and translate a batch feature (function) there ensuring it's the unit which handles 'translation' and translation only. It's a functor in essence, which handles translation of a "Batch". Maybe I am missing something, can you elaborate on how I can cleanly add it in Service without making Service something of a God class? |
Regression tests with latest source, both seem passing.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jerinphilip The code looks fine to me. I left a comment regarding the usage of __EMSCRIPTEN__
pre-prcoessor 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If the only change is to the macro...
I thank the creators of Regression tests: Pass
|
For #61.
ifdefs
back.Service
.