Parsed calculations are now cached between calculations
Parsing is one of the more expensive computations done to characters, so the parser results are now stored on the DB and only updated if they are dirty. A hash is used to determine if the calculation has changed since the last computation
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import resolve, { traverse, toString } from '../resolve';
|
||||
import error from './error';
|
||||
|
||||
const index = {
|
||||
const indexNode = {
|
||||
create({array, index}) {
|
||||
return {
|
||||
parseType: 'index',
|
||||
@@ -53,7 +53,7 @@ const index = {
|
||||
}
|
||||
}
|
||||
return {
|
||||
result: index.create({
|
||||
result: indexNode.create({
|
||||
index,
|
||||
array,
|
||||
}),
|
||||
@@ -70,4 +70,4 @@ const index = {
|
||||
},
|
||||
}
|
||||
|
||||
export default index;
|
||||
export default indexNode;
|
||||
|
||||
Reference in New Issue
Block a user