Generating Compile Cache Ahead of Runtime
Personne n'a encore pris cette issue.
- Langage dominant
- JavaScript
- Étoiles
- 122k
- Forks
- 37.3k
- Merge moyen
- 4 j 2 h
- PR mergées (30 j)
- 283
Description
What is the problem this feature will solve?
It is currently not possible to generate the compile cache without executing the files that will be cached.
Currently, container images and lambda functions can't easily generate code caches ahead of the actual runtime, since the code may have effects you may not want to execute early.
What is the feature you are proposing to solve the problem?
Would it be possible to add a way to generate the compile cache without executing the relevant files, i.e. walking the module tree from the entry point, generating caches along the way?
Perhaps something like node --generate-compile-cache path/to/entrypoint.mjs
and/or
module.generateCompileCache("path/to/entrypoint.mjs")
What alternatives have you considered?
You may be able to work around this by adding "dry-run" code paths specifically for code cache generation, but this is a hacky workaround that can require massive effort.
Guide de contribution
Ouvrir le guide de contribution
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Piste de recherche
Commencez par examiner le comportement existant du cache de compilation de Node.js ainsi que les points d’entrée proposés --generate-compile-cache et module.generateCompileCache(). Déterminez comment parcourir l’arbre des modules d’un point d’entrée sans exécuter le code de l’application. Le travail sera considéré comme terminé lorsqu’il existera un moyen documenté et testé de générer le cache de compilation pertinent avant l’exécution.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Évaluation
- Stack technique
- javascript, node.js
- Domaine
- backend
- Type d'issue
- Fonctionnalité
- Difficulté
- 5/5
- Temps estimé
- Plus d'une semaine
- Activité
- Active
- Clarté
- Plutôt claire
- Accessibilité débutants
- 38/100