Commit Graph

39 Commits

Author SHA1 Message Date
Tobias Koppers 766be5a3fd add cache.profile flag for more info about (de)serialization timings 2021-04-28 09:10:43 +02:00
Tobias Koppers 0eb2f352fe fix typo
thanks @markjm
2021-04-21 07:20:11 +02:00
Tobias Koppers 177736f59c avoid leaking unused memory in buffer backing stores in development mode 2021-04-20 15:22:16 +02:00
Tobias Koppers 8f3a16a49a improve handling of optional build dependencies 2021-04-06 11:28:41 +02:00
Tobias Koppers c84329f73c add GC to the memory cache and make it configurable
memory GC happens by default when persistent cache is enabled and in development mode
otherwise memory cache is kept forever

make maxAge for persistent cache configurable
GC the oldest content file even if it's not touched (to keep cache size small)

filesystem cache will now no longer cache in memory, but restore items from disk again when it was persisted
2021-04-01 17:12:53 +02:00
Tobias Koppers 8074127b98 avoid leaking memory after the compiler has been closed
clear cache on shutdown
2021-04-01 16:59:48 +02:00
Tobias Koppers a1515fa9f0 add experimental lazy compilation 2021-01-21 17:39:56 +01:00
Tobias Koppers c453624a57 store build deps correctly in cache
improve debug logging for snapshotting
2021-01-13 23:54:15 +01:00
highonweb bc1911bf78 Changed name of memorize function to memoize 2020-12-27 03:02:57 +05:30
Tobias Koppers c75a9ef87f errors in initial cache no longer cause build dependencies to be ignored 2020-12-15 17:06:33 +01:00
Tobias Koppers d6e637f33c add "snapshot" configuration to allow to configure how snapshots are created
expose snapshot options for module, resolve, buildDependencies and resolveBuildDependencies
move managedPaths and immutablePaths from config.cache to config.snapshot
add timestamp + hash snapshotting mode
use timestamp + hash mode by default in production and for buildDependencies
2020-08-26 01:27:13 +02:00
Tobias Koppers 4ccb35170b split cache into smaller parts 2020-08-24 18:16:55 +02:00
Tobias Koppers cee47dc867 Store cache dependencies inside of Snapshot to reduce cache size 2020-08-24 18:16:54 +02:00
Tobias Koppers 096c1ec5bd Partially serialize cache items even when some fail to serialize 2020-08-19 20:06:03 +02:00
Tobias Koppers 1ac28f7fc2 improve progress reporting 2020-08-14 10:54:26 +02:00
evilebottnawi dafa4cd69a chore: setup cspell 2020-03-12 19:51:26 +03:00
Nitin Kumar 285529a643
chore: fix typos across the project 2020-03-10 07:29:46 +05:30
Tobias Koppers e96695a18a add more time logging 2020-01-30 16:10:56 +01:00
Tobias Koppers ec5a744b30 Remove "error" and "ignore" from snapshots 2020-01-29 21:32:50 +01:00
Tobias Koppers 6fd166508c clarification about serialized null and undefined 2020-01-29 10:38:31 +01:00
Tobias Koppers f49838c95d style improvements and test 2020-01-28 11:35:10 +01:00
Tobias Koppers b40a345451 refactor Persistent Cache
cache is split into multiple .pack files which represent usage of cache items
this allows to only read/deserialize files that are needed
and reduces the need to rewrite .pack files
while still packaging multiple cache items together

lazy (de)serialization system has changed to allow writeLazy and writeSeparate
2020-01-28 11:35:06 +01:00
Tobias Koppers 1a3b391352 compute asset hash lazily to avoid hash computation when memory cache is used
Cache accepts null as break condition when etag mismatches
MemoryCachePlugin caches cache mismatches
2019-11-12 16:07:50 +01:00
Tobias Koppers 81d413a175 Make Pack optimization less noisy and don't invalidate file 2019-11-10 21:04:51 +01:00
Tobias Koppers b401713633 fix problem with snapshotting managed items
add support for child loggers
add logging for snapshot errors
improve FileSystemInfo logging
improve managed item reading performance
upgrade enhanced-resolve for readdir purge fix
2019-11-05 23:12:02 +01:00
Tobias Koppers d3cf3928f5 Persistent Caching fixes
improve error handling in pack file cache strategy
support context timestamp snapshot
make ContextModule serializable
fix snapshotting bug of managed paths
use managed and immutable path info for context hashes and timestamps
enabled managedPaths for node_modules during cache tests
2019-09-04 16:33:54 +02:00
Tobias Koppers 7f7673e5ab provide error fallback when validation errors occur 2019-08-22 10:44:48 +02:00
Tobias Koppers 82452939f5 Move version into PackContainer 2019-08-20 14:50:13 +02:00
Tobias Koppers b3729d40fa improve logging of PackFileCacheStrategy 2019-08-20 14:50:13 +02:00
Tobias Koppers e425ab9345 Avoid retry of unserializable entries in pack 2019-08-20 14:50:12 +02:00
Tobias Koppers cb4c02ebe1 store snapshot of resolving dependencies and re-resolve when needed
to be able to invalidate cache when PnP build dependencies change

cacheDirectory defaults to .pnp/.cache/webpack when PnP is used
fallback cacheDirectory is now .cache/webpack instead of tmpdir
2019-08-20 14:50:09 +02:00
Tobias Koppers a2caa36b8e add immutablePaths next to managedPaths for paths in the yarn cache
for PnP support
2019-08-20 14:50:07 +02:00
Tobias Koppers e8e313b576 capture build dependencies only when pack is invalid
capture build dependencies during storing phase

capture only new build dependencies
2019-08-13 18:59:17 +02:00
Tobias Koppers 03491deca9 Debug message when item invalidated pack
Check identity before invalidating the pack
2019-08-13 18:53:41 +02:00
Tobias Koppers a777ec40b3 restore and check buildSnapshot before reading pack content 2019-08-13 17:02:49 +02:00
Tobias Koppers e5cecdad23 store build dependencies snapshot in pack
add snapshot shortcut for package manager managed paths
add cache.managedPaths
2019-08-13 17:02:37 +02:00
Tobias Koppers f236df1bc9 replace logging in persistent caching with infrastructure logger
remove cache.loglevel
2019-08-12 13:41:23 +02:00
Tobias Koppers e9c0d068dd refactor filesystem interfaces
add Compiler.intermediateFileSystem
avoid using `path` and `fs` module when possible
move `join`, `mkdirp` and `dirname` into utils
join and dirname is optional in FileSystem interface
remove mkdirp from Filesystem interface
2019-06-11 17:32:58 +02:00
Tobias Koppers 7c0d845af3 Refactor FileCachePlugin into multiple modules 2019-01-25 19:21:45 +01:00