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

module: fix stat cache & simpler shebang #26266

Closed
wants to merge 5 commits into from

Commits on Feb 22, 2019

  1. module: simpler shebang function

    This simplifies the shebang function significantly. Before, it was
    optimized for two characters input. Any module actually parsed should
    however have more characters than just the shebang.
    The performance stays the same as before.
    BridgeAR committed Feb 22, 2019
    Configuration menu
    Copy the full SHA
    c43011f View commit details
    Browse the repository at this point in the history
  2. module: fix stat cache

    The current caching logic broke by [0] because it used destructuring
    on the module arguments. Since the exported property is a primitive
    counting it up or down would not have any effect anymore in the module
    that required that property.
    
    The original implementation would cache all stat calls caused during
    bootstrap. Afterwards it would clear the cache and lazy require calls
    during runtime would create a new cascading cache for the then
    loaded modules and clear the cache again.
    This behavior is now restored. This is difficult to test without
    exposing a lot of information and therfore the existing tests have
    been removed (as they could not detect the issue).
    
    With the broken implementation it caused each module compilation to
    reset the cache and therefore minimizing the effect drastically.
    
    [0] nodejs#19177
    BridgeAR committed Feb 22, 2019
    Configuration menu
    Copy the full SHA
    0b3c65f View commit details
    Browse the repository at this point in the history
  3. fixup: add period at end of sentence

    Co-Authored-By: BridgeAR <ruben@bridgewater.de>
    addaleax and BridgeAR committed Feb 22, 2019
    Configuration menu
    Copy the full SHA
    fdbf472 View commit details
    Browse the repository at this point in the history

Commits on Feb 28, 2019

  1. fixup: address comment

    BridgeAR committed Feb 28, 2019
    Configuration menu
    Copy the full SHA
    512210f View commit details
    Browse the repository at this point in the history
  2. Revert "fixup: address comment"

    This reverts commit 512210f.
    BridgeAR committed Feb 28, 2019
    Configuration menu
    Copy the full SHA
    e18e8be View commit details
    Browse the repository at this point in the history