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:
Stefan Zermatten
2021-10-03 20:59:04 +02:00
parent c2d430ad23
commit 1a14393031
12 changed files with 95 additions and 29 deletions

View File

@@ -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;