Commit Graph

140 Commits

Author SHA1 Message Date
Tobias Koppers 6409463d24 only create shared snapshots for 3 or more shared entries
add logging
2020-08-24 18:16:50 +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 48ff7043f1 add provide and mergeEtags to CacheFacade 2020-08-19 11:25:24 +02:00
Tobias Koppers 1ac28f7fc2 improve progress reporting 2020-08-14 10:54:26 +02:00
Tobias Koppers f9fe121fc8 improve and add statistics 2020-08-14 10:51:12 +02:00
Tobias Koppers ca369f23c5 do cache related tasks after calling handler in watching
improve progress output
2020-08-01 09:00:17 +02:00
Tobias Koppers fd9b399ae9 Create Cache facade to make it easier to use
add missing serializers for classes used in test suite
2020-07-15 11:14:28 +02:00
Tobias Koppers cfb52451d4 handle case when no snapshot can be created in ResolverCachePlugin 2020-07-07 17:38:03 +02:00
Tobias Koppers b9c50fdb09 fix jsdoc documentations 2020-04-28 19:42:58 +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
Albus Dumbledore 4571fdab69
Fix branding violation ResolverCachePlugin 2020-02-12 20:26:11 +05:30
Albus Dumbledore 466e28b312
Fix branding violation MemoryCachePlugin 2020-02-12 20:23:16 +05:30
Albus Dumbledore ed881885c3
Fix branding violation IdleFileCachePlugin.js 2020-02-12 20:21:28 +05:30
Albus Dumbledore edc7c8fcd5
Fix branding violation AddManagedPathsPlugin 2020-02-12 20:19:14 +05:30
Albus Dumbledore 24448180b0
Fix Branding violation AddBuildDependenciesPlugin 2020-02-12 20:11:30 +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 cb543a444c seralization class for resolver cache 2020-01-28 11:35:29 +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 87f6eedb16 make sure only a single strategy method is invoked at a time 2020-01-15 11:21:36 +01:00
Tobias Koppers 8fcd251a7f fix cacheWithContext inversion 2019-11-13 12:18:32 +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 a8b289bbc9 merge concurrent ResolverCache requests 2019-11-10 21:04:57 +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 da5ab282e6 fix resolve caching with different resolve options 2019-11-10 21:04:48 +01:00
Tobias Koppers 23f4a53819 respect cacheWithContext in ResolverCachePlugin, default to false 2019-11-10 21:04:46 +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 00fcd1dbe8 use LazySet in ResolverCachePlugin 2019-11-01 12:21:55 +01:00
Tobias Koppers 8ba5ff6184 remove temporary workaround for fileDependencies in enhanced-resolve 2019-11-01 12:18:17 +01:00
Tobias Koppers 92e1fc2860 only log ResolverCachePlugin debug message when it has information to provide 2019-11-01 12:17:35 +01:00
Tobias Koppers 87abd00c6e remove all options for cache.store expect "pack"
these are incomplete and may be readded later
2019-10-21 09:22:38 +02: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 856235d76f track and config build dependencies 2019-08-12 23:07:41 +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 c21fb4bd58 Add LazySet for file/context/missingDependencies for performance 2019-08-07 16:13:56 +02:00
Tobias Koppers fd35041dd3
Merge pull request #9476 from webpack/logging/times
add more timestamp logging to some core parts
2019-07-26 15:01:50 +02:00
Tobias Koppers 0750da4dc3 add statistics report to ResolverCachePlugin 2019-07-26 14:03:22 +02:00
Tobias Koppers d2181eeffa pass missing idleTimeout options to CachePlugin 2019-07-26 13:59:15 +02:00
Tobias Koppers e2b1ab3258 adding some random types 2019-07-18 14:15:20 +02:00
Tobias Koppers c94073b31c update enhanced-resolve 2019-07-05 00:45:41 +02:00
Tobias Koppers b2e7837288 replace Object.assign with object spread 2019-06-19 13:16:05 +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 39c75ee6a9 add stages for Cache plugins 2019-05-13 11:03:10 +02:00
Tobias Koppers 180f912493 Merge tag 'v4.29.2' into next
4.29.2
2019-02-06 15:37:11 +01:00
Tobias Koppers 7c0d845af3 Refactor FileCachePlugin into multiple modules 2019-01-25 19:21:45 +01:00
Tobias Koppers e9c6539645 change Serializer API to be not file serialization specific 2019-01-24 17:42:38 +01:00
Tobias Koppers 3a1eefec0a Measure size of objects to decide about inline or lazy storing 2019-01-24 15:14:41 +01:00
Tobias Koppers cf71cd0dd8 faster way to provide got handlers for cache 2019-01-19 12:31:24 +01:00
Tobias Koppers ba6ac9ae81 add cache.idleTimeoutForInitialStore
to allow to force an initial store
2019-01-19 12:07:26 +01:00
Tobias Koppers e4a5e59570 add cache.idleTimeout option to delay cache storing 2019-01-19 11:47:53 +01:00
Tobias Koppers 00065741d2 log a warning when serialization fails 2019-01-19 11:47:19 +01:00
Tobias Koppers 4492c30ac4 Update watching system to report more timing info to webpack
Add snapshotting feature to FileSystemInfo for better performance
2019-01-09 14:42:54 +01:00
Tobias Koppers 0fd50ddd84 avoid JSON.stringify for better performance 2019-01-08 15:14:30 +01:00
Tobias Koppers ef9e25d8ea report dependencies from resolver to the compilation
refactor NormalModuleFactory
2019-01-08 15:14:25 +01:00
Florent Cailhol e06a808763 Expose the serialization API 2018-12-28 13:21:19 +01:00
Tobias Koppers 77c2e61a31 remove memory cache from FileCachePlugin
support layers of caches
2018-12-27 20:57:54 +01:00
Tobias Koppers ea255fd38a Remember unserializable things and avoid trying again 2018-12-21 12:36:38 +01:00
Tobias Koppers f15956f19f The context result is not a context dependency
The resulting directory should be threated as file dependency
as it doesn't depend on the content of the directory
2018-12-21 12:29:49 +01:00
Tobias Koppers d9238f061d memorize lazy data on access
remove need for read on write
add queue for file accesses in FileMiddleware to support concurrent access
2018-12-21 12:05:29 +01:00
Tobias Koppers 14ec0aa4cf remove the static memory cache, leaving only the per compilation memory cache
Otherwise this leaks memory
2018-12-20 17:32:52 +01:00
Tobias Koppers 02ba24aca8 add a `cache` option to control the resolve cache 2018-10-31 13:55:28 +01:00
Tobias Koppers 4ed5622b53 add direct memory cache 2018-10-31 13:07:07 +01:00
Tobias Koppers 2688b5b17f add resolver cache 2018-10-30 15:43:26 +01:00
Tobias Koppers 9e3cecc21e resolve promise even if caching failed 2018-10-30 09:54:53 +01:00
Tobias Koppers 3c8bb29834 use lazy serialization when etag is passed 2018-10-30 09:54:51 +01:00
Tobias Koppers 0cc84d8227 default to packed mode 2018-10-30 09:54:49 +01:00
Tobias Koppers a594f9884c add another loglevel to the persistent cache 2018-10-30 09:54:45 +01:00
Tobias Koppers 590772b934 add packed store mode 2018-10-30 09:54:40 +01:00
Tobias Koppers 6b0da68ed9 run all test cases with caching 2018-10-17 22:15:46 +02:00
Tobias Koppers 459fef0263 fix warning stack for failed module 2018-10-17 21:25:41 +02:00
Tobias Koppers d2f1484914 no need to create cache directory before build 2018-10-17 21:25:41 +02:00
Tobias Koppers 7b85f99a97 improve loglevel option 2018-10-17 21:25:41 +02:00
Tobias Koppers b536fe7aee default cache.name to name + mode 2018-10-17 21:25:40 +02:00
Tobias Koppers 3e05206b6d improved error messages for failed deserialization 2018-10-17 21:25:40 +02:00
Tobias Koppers a852828279 add persistent caching prototype 2018-10-17 21:25:39 +02:00
Tobias Koppers 9b8d26f6e8 refactor cache to be more generic and usable for other things 2018-10-11 10:46:48 +02:00
Tobias Koppers 7340fbb547 refactor Cache
add a new hookable Cache class
removed CachePlugin
add MemoryCachePlugin
refactor timestamps
create FileSystemInfo class
2018-09-27 13:20:19 +02:00