diff --git a/benchmark/fixtures/models/get-blocks/index.js b/benchmark/fixtures/models/get-blocks/index.js new file mode 100644 index 000000000..2de37c1e4 --- /dev/null +++ b/benchmark/fixtures/models/get-blocks/index.js @@ -0,0 +1,10 @@ + +import { __clear } from '../../../../lib/utils/memoize' + +export default function (state) { + state.document.getBlocks() +} + +export function after() { + __clear() +} diff --git a/benchmark/fixtures/models/get-blocks/input.yaml b/benchmark/fixtures/models/get-blocks/input.yaml new file mode 100644 index 000000000..b510137eb --- /dev/null +++ b/benchmark/fixtures/models/get-blocks/input.yaml @@ -0,0 +1,683 @@ +nodes: +- kind: block + type: paragraph + nodes: + - kind: block + type: paragraph + nodes: + - kind: block + type: paragraph + nodes: + - kind: text + ranges: + - text: 'This is editable ' + - text: 'rich' + marks: + - type: bold + - text: ' text, ' + - kind: block + type: paragraph + nodes: + - kind: text + ranges: + - text: 'much' + marks: + - type: italic + - text: ' better than a ' + - text: '