mirror of https://github.com/webpack/webpack.git
				
				
				
			less memory, reduce timing verbosity
This commit is contained in:
		
							parent
							
								
									126fb99121
								
							
						
					
					
						commit
						2e0ce0d1a9
					
				| 
						 | 
				
			
			@ -212,8 +212,11 @@ const visitModules = (
 | 
			
		|||
		.reverse();
 | 
			
		||||
	/** @type {Map<ChunkGroup, Set<ChunkGroup>>} */
 | 
			
		||||
	const queueConnect = new Map();
 | 
			
		||||
	/** @type {Set<ChunkGroupInfo>} */
 | 
			
		||||
	const outdatedChunkGroupInfo = new Set();
 | 
			
		||||
	/** @type {QueueItem[]} */
 | 
			
		||||
	let queueDelayed = [];
 | 
			
		||||
 | 
			
		||||
	logger.timeEnd("prepare");
 | 
			
		||||
 | 
			
		||||
	/** @type {Module} */
 | 
			
		||||
| 
						 | 
				
			
			@ -414,10 +417,9 @@ const visitModules = (
 | 
			
		|||
			}
 | 
			
		||||
		}
 | 
			
		||||
		logger.timeEnd("visiting");
 | 
			
		||||
		logger.time("calculating available modules");
 | 
			
		||||
 | 
			
		||||
		/** @type {Set<ChunkGroupInfo>} */
 | 
			
		||||
		const outdatedChunkGroupInfo = new Set();
 | 
			
		||||
		if (queueConnect.size > 0) {
 | 
			
		||||
			logger.time("calculating available modules");
 | 
			
		||||
 | 
			
		||||
			// Figure out new parents for chunk groups
 | 
			
		||||
			// to get new available modules for these children
 | 
			
		||||
| 
						 | 
				
			
			@ -456,6 +458,7 @@ const visitModules = (
 | 
			
		|||
			queueConnect.clear();
 | 
			
		||||
			logger.timeEnd("calculating available modules");
 | 
			
		||||
 | 
			
		||||
			if (outdatedChunkGroupInfo.size > 0) {
 | 
			
		||||
				logger.time("merging available modules");
 | 
			
		||||
				// Execute the merge
 | 
			
		||||
				for (const info of outdatedChunkGroupInfo) {
 | 
			
		||||
| 
						 | 
				
			
			@ -526,7 +529,10 @@ const visitModules = (
 | 
			
		|||
					}
 | 
			
		||||
					info.skippedItems.length = 0;
 | 
			
		||||
				}
 | 
			
		||||
				outdatedChunkGroupInfo.clear();
 | 
			
		||||
				logger.timeEnd("merging available modules");
 | 
			
		||||
			}
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
		// Run queueDelayed when all items of the queue are processed
 | 
			
		||||
		// This is important to get the global indicing correct
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue