* This clears the decoded array and falls back to the encoded string form. * Sourcemap mappings arrays can be very large and holding on to them for longer * than is necessary leads to poor heap utilization.
(cache: CachedSourcemapData)
| 28 | * than is necessary leads to poor heap utilization. |
| 29 | */ |
| 30 | function resetCacheToEncoded(cache: CachedSourcemapData) { |
| 31 | if (cache.encodedMappings === undefined && cache.decodedMappings) { |
| 32 | cache.encodedMappings = encode(cache.decodedMappings); |
| 33 | } |
| 34 | cache.decodedMappings = undefined; |
| 35 | } |
| 36 | |
| 37 | export function resetSourcemapCache( |
| 38 | map: ExistingDecodedSourceMap | null, |
no test coverage detected
searching dependent graphs…