Comparing version 0.9.0 to 0.9.1
# rollup changelog | ||
## 0.9.1 | ||
* Much faster statement insertion (fixes major 0.9.0 performance regression) | ||
## 0.9.0 | ||
@@ -4,0 +8,0 @@ |
@@ -1781,2 +1781,3 @@ 'use strict'; | ||
var included = blank(); | ||
var highestIndex = blank(); | ||
@@ -1787,18 +1788,24 @@ function include(statement) { | ||
var len = sorted.length; | ||
var i = 0; | ||
var alreadyIncluded = false; | ||
for (i = 0; i < len; i += 1) { | ||
// ensure that this statement appears above later statements | ||
// from the same module - in rare situations (#34) they can | ||
// become jumbled | ||
var existing = sorted[i]; | ||
if (existing.module === statement.module && existing.index > statement.index) { | ||
sorted.splice(i, 0, statement); | ||
alreadyIncluded = true; | ||
var unordered = statement.index < highestIndex[statement.module.id]; | ||
highestIndex[statement.module.id] = Math.max(statement.index, highestIndex[statement.module.id] || 0); | ||
if (unordered) { | ||
var len = sorted.length; | ||
var i = 0; | ||
for (i = 0; i < len; i += 1) { | ||
// ensure that this statement appears above later statements | ||
// from the same module - in rare situations (#34) they can | ||
// become jumbled | ||
var existing = sorted[i]; | ||
if (existing.module === statement.module && existing.index > statement.index) { | ||
sorted.splice(i, 0, statement); | ||
return; | ||
} | ||
} | ||
} | ||
if (!alreadyIncluded) sorted.push(statement); | ||
sorted.push(statement); | ||
} | ||
@@ -1805,0 +1812,0 @@ |
{ | ||
"name": "rollup", | ||
"version": "0.9.0", | ||
"version": "0.9.1", | ||
"description": "Next-generation ES6 module bundler", | ||
@@ -5,0 +5,0 @@ "main": "dist/rollup.js", |
@@ -250,2 +250,3 @@ import { basename, dirname, extname, relative } from 'path'; | ||
let included = blank(); | ||
let highestIndex = blank(); | ||
@@ -256,18 +257,27 @@ function include ( statement ) { | ||
const len = sorted.length; | ||
let i = 0; | ||
let alreadyIncluded = false; | ||
for ( i = 0; i < len; i += 1 ) { | ||
// ensure that this statement appears above later statements | ||
// from the same module - in rare situations (#34) they can | ||
// become jumbled | ||
const existing = sorted[i]; | ||
if ( existing.module === statement.module && existing.index > statement.index ) { | ||
sorted.splice( i, 0, statement ); | ||
alreadyIncluded = true; | ||
const unordered = statement.index < highestIndex[ statement.module.id ]; | ||
highestIndex[ statement.module.id ] = Math.max( | ||
statement.index, | ||
highestIndex[ statement.module.id ] || 0 | ||
); | ||
if ( unordered ) { | ||
const len = sorted.length; | ||
let i = 0; | ||
for ( i = 0; i < len; i += 1 ) { | ||
// ensure that this statement appears above later statements | ||
// from the same module - in rare situations (#34) they can | ||
// become jumbled | ||
const existing = sorted[i]; | ||
if ( existing.module === statement.module && existing.index > statement.index ) { | ||
sorted.splice( i, 0, statement ); | ||
return | ||
} | ||
} | ||
} | ||
if ( !alreadyIncluded ) sorted.push( statement ); | ||
sorted.push( statement ); | ||
} | ||
@@ -274,0 +284,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
135988
3341