Skip to content
This repository has been archived by the owner on May 15, 2024. It is now read-only.

fix(one-app-server-bundler): serve-module read and write the module map once #623

Merged
merged 6 commits into from
Mar 27, 2024

Conversation

PixnBits
Copy link
Contributor

@PixnBits PixnBits commented Mar 18, 2024

Description

Read and write the module map from/to disk O(1) rather than O(n) in serve-module.

Motivation

Filesystem operations are slower than memory operations, so with #622 it'll be useful to reduce the total filesystem operations from 2*number of modules to just 2.

Should help reduce startup time with one-app-runner (albeit not as extreme as #622).

Test Conditions

existing tests pass 🙌
added a test to verify the thrown exception message when no modules are provided

Types of changes

Check boxes that apply:

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation (adding or updating documentation)
  • Dependency update
  • Security update

Checklist

Check boxes that apply:

  • My code follows the code style of this project.
  • My change requires a change to the documentation and I have updated the documentation accordingly.
  • These changes should be applied to a maintenance branch.
  • I have added the Apache 2.0 license header to any new files created.

bishnubista
bishnubista previously approved these changes Mar 25, 2024
@10xLaCroixDrinker
Copy link
Member

@PixnBits you've got a failing snapshot

@10xLaCroixDrinker
Copy link
Member

@PixnBits I believe either perf or refactor would be the correct commit type, not fix.

@PixnBits PixnBits merged commit 391a390 into main Mar 27, 2024
5 checks passed
@PixnBits PixnBits deleted the fix/one-app-server-bundler_read-write-module-map-once branch March 27, 2024 21:27
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants