Rewatch: in-process bsc prototype
Maintainer antworten meist innerhalb von 1 Tag
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 5/5
- Geschätzter Aufwand
- Über eine Woche
- Anfängerfreundlichkeit
- 35/100
- Issue-Typ
- Feature
- Klarheit
- Größtenteils klar
- Aktivitätsstatus
- Aktiv
- Tech-Stack
- ocaml
- Bereich
- build-system, compilers, performance
Rechercherichtung
Beginne mit der OCaml-Rewatch-Neuimplementierung aus #8653 und verfolge, wie die ausführbare Datei bsc für die Schritte zum Parsen und Kompilieren aufgerufen wird, einschließlich der Builds von stdlib und Tests. Dokumentiere die beteiligten Artefakte und den gemeinsamen Zustand und definiere anschließend einen sequenziellen Prototyp-Benchmark sowie eine konkrete Empfehlung dafür, worauf eine spätere Implementierung abzielen sollte.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
Based on the OCaml rewatch reimplementation from #8653, we can prototype integrating the compiler directly into the rewatch executable to avoid having to spawn a bsc binary for each compilation step.
@cristianoc fed the prompt below into Fable, and I fed the same one into Astra.
I'll post the responses we got as separate comments. These can serve as a basis for further discussion.
We are porting Rewatch to OCaml as a drop-in for the Rust version. Next I want to see whether in-process bsc is worth it: stop spawning a bsc process per module, and ideally stop writing cmj/cmt (and maybe cmi) to disk at all.
Do not implement yet. Think this through with me.
Context:
- A lot of build time is process creation and artifact I/O, not typechecking.
- Integration might be >2x. I want a dirty prototype that measures that, even if it is incorrect and single-threaded.
- The compiler has lots of global/shared mutable state (Clflags, Config.load_path, Env cache, Ident, Js_config, typechecker mutation, etc.). There are essentially no tests that reuse one compiler process across modules.
- Getting rid of global state is probably much easier than the Rewatch port, but only if we know what to reset/isolate.
- No multicore required for the prototype. Sequential in-process with no cm* writes may already be faster.
- A real compiler service / parallel-from-one-process comes later.
Please:
- Survey how bsc is invoked today (parse vs compile), what it reads/writes (ast, cmi, cmj, cmt, js), and which globals would leak across compilations.
- Propose the smallest prototype that can give a real speedup signal on stdlib + tests (or a real project). What can stay on disk? What must be in memory? What must be reset between modules?
- Argue whether that prototype is the right next step, or whether something else is better (reset-and-reuse API, keep writing cmi only, compiler service still spawning-free but still on disk, etc.).
- Explicitly list what is likely to go well, what is likely to go wrong, and how we would get fooled by a misleading benchmark.
- Recommend a concrete goal we could later implement with /goal.
- Vorherrschende Sprache
- ReScript
- Sterne
- 7.5k
- Forks
- 483
- Ø Merge
- 1 T. 4 Std.
- Gemergte PRs (30 T.)
- 130
Entwicklungsumgebung
Startet den Dev-Container des Projekts im Browser, mit Ihrem eigenen GitHub-Konto.
- Kein Dockerfile und keine Docker-Compose-Datei
- Hat eine Pull-Request-Vorlage
- Beitragsleitfaden lesen
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus rescript-lang/rescript
-
Schwierigkeit 5/5 Über eine Woche Anfängerfreundlichkeit 25/100
rescript-lang/rescript#8878 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 5/5 Über eine Woche Anfängerfreundlichkeit 35/100
rescript-lang/rescript#8806 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 5/5 Über eine Woche Anfängerfreundlichkeit 35/100
rescript-lang/rescript#8798 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 3/5 Ein halber Tag Anfängerfreundlichkeit 58/100
rescript-lang/rescript#8757 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 3/5 1-2 Tage Anfängerfreundlichkeit 40/100
rescript-lang/rescript#8753 ·
Maintainer antworten meist innerhalb von 1 Tag
Alle Issues in rescript-lang/rescript
Ähnliche Issues
-
dependencies effort:S priority:P2
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 85/100
Maintainer antworten meist innerhalb von 1 Tag
-
app:web meta:ops
Schwierigkeit 2/5 Ein halber Tag Anfängerfreundlichkeit 78/100
osu-tournament-rating/otr#1113 ·
Maintainer antworten meist innerhalb von 1 Tag
-
[raylib] update to 6.2Offencategory:port-update
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 70/100
Maintainer antworten meist innerhalb von 2 Tagen
-
bug cli libc sev-3
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
-
bug help wanted
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 65/100
DarkStarSystems/pcons#229 ·
Maintainer antworten meist innerhalb von 1 Tag