Skip to content

Fast path for CommonJS on Module._compile #139

@H4ad

Description

@H4ad

In theory, we can move the load of content of a module to C++ when:

  • the experimental policy is not enabled
  • and when the module is not ESM
  • and when the module is not patched

Since the content goes directly to the C++ without modification:


Also, I don't have any idea if worth or is viable but maybe we could use StreamedSource instead of Source, in this way, we probably can save some memory and load the script much faster.

Let me know what you think, this is something that was in my mind for a while and I just wanna to share it with more people to understand if is possible or not.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions