Commit Graph

42 Commits

Author SHA1 Message Date
Tobias Koppers ba832ec08c
Merge pull request #10326 from vankop/refactor-binary-middleware
refactor BinaryMiddleware
2020-02-06 09:42:15 +01:00
Ivan Kopeykin 19f5cd879e (#10326) resolve discussions 2020-02-05 13:19:10 +03:00
Ivan Kopeykin 350e397f63 refactor(FileMiddleware): add format information, minor code refactoring 2020-01-31 19:53:50 +03:00
Ivan Kopeykin 3cd865d7ab refactor(BinaryMiddleware): 2020-01-31 16:52:57 +03:00
Tobias Koppers eab25de485 dedupe object keys of plain object 2020-01-28 11:35:18 +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 95297186d5 remove Array.prototype.reduce calls to simplify code 2020-01-20 14:41:39 +01:00
Tobias Koppers b086bfbcc6 faster object type lookup during deserialization 2019-11-13 12:18:04 +01:00
Tobias Koppers 6eb9958643 print warning for large serialized strings 2019-11-10 21:04:54 +01:00
Tobias Koppers 8c594a61c1 Avoid recursion for nested plain objects 2019-11-10 21:04:49 +01:00
Tobias Koppers d8c93b40be faster serialization for deserialized data 2019-11-04 10:46:33 +01:00
Tobias Koppers 83c5305872 improve error message when deserialization failed 2019-11-01 12:19:27 +01:00
Tobias Koppers e9596ac799 faster referenceables in ObjectMiddleware 2019-08-13 17:03:01 +02:00
Tobias Koppers 563f8635b6 performance and memory improvement of BinaryMiddleware 2019-08-13 17:02:57 +02:00
Tobias Koppers 5320fcfbbe bugfix for nested promises in FileMiddleware 2019-08-13 17:02:47 +02:00
Tobias Koppers b2e7837288 replace Object.assign with object spread 2019-06-19 13:16:05 +02:00
Tobias Koppers 6db94536ad Merge tag 'v4.34.0' into next
4.34.0
2019-06-13 10:51:12 +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 e9c6539645 change Serializer API to be not file serialization specific 2019-01-24 17:42:38 +01:00
Tobias Koppers ad6e095c43 Improve typings of SerializerMiddlewares 2019-01-24 16:51:05 +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 aa72c93b4d Use Buffer.allocUnsafe for better performance and buffer pooling 2019-01-24 15:14:39 +01:00
Tobias Koppers f68d465afa make reading from file safer and handle unexpected end of file 2019-01-19 11:49:30 +01:00
Tobias Koppers 00065741d2 log a warning when serialization fails 2019-01-19 11:47:19 +01:00
Sergey Tatarintsev eeb6e2db17 Improve memory consumption of file middleware
Buffers.concat creates a new buffer. On a large project, when using resolver
cache and pack store, total size of buffer can reach hundreds of megabytes. Use
streaming write instead.
2019-01-14 19:20:28 +01:00
Tobias Koppers 44663f8c67 allow serializing of objects with null prototype 2018-12-25 22:08:35 +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 aedc34b76d load internal serializers internally
allows to bundle webpack
2018-12-20 11:04:31 +01:00
Florent Cailhol 0d7889faab Remove unneeded intermediate objects 2018-11-02 11:57:42 +01:00
Tobias Koppers b1073349eb reorder maps to make binary encoding more efficient 2018-10-30 09:54:47 +01:00
Tobias Koppers 590772b934 add packed store mode 2018-10-30 09:54:40 +01:00
Tobias Koppers c46d89b02d serialize JS Errors 2018-10-25 10:52:33 +02:00
Michael Ciniawsky f7df43d080 feat(ErrorObjectSerializer): make `{Error}` serializable 2018-10-25 10:52:32 +02:00
Tobias Koppers 4b69df1117 allow to make classes not-serializable
make ContextModule not-serializable because it's not needed
2018-10-18 15:52:22 +02:00
Tobias Koppers 06cd79f17f add serializer for RegExp 2018-10-18 12:44:38 +02:00
Tobias Koppers 7786a6a0ed fix serializing of Buffers 2018-10-17 22:16:15 +02:00
Tobias Koppers b93ba710df add error for circular references while serializing 2018-10-17 21:25:46 +02:00
Tobias Koppers 2cfbea35bc fix bug with too long short strings 2018-10-17 21:25:41 +02:00
Tobias Koppers a9554a70e6 skip reference for empty strings 2018-10-17 21:25:40 +02:00
Tobias Koppers e1adc52745 improve length of emitted cache files 2018-10-17 21:25:40 +02:00
Tobias Koppers a852828279 add persistent caching prototype 2018-10-17 21:25:39 +02:00