Novel diff algorithm for realizing fast positioning and difference rendering updating

A fast and algorithmic technology, applied in computing, instrumentation, and other database retrieval directions, it can solve problems such as stacking memory usage, reducing the efficiency of differential rendering updates, slowing down rendering speed, etc., to avoid memory usage, positioning, and rendering updates. The effect of improving efficiency and reducing the amount of calculation

Pending Publication Date: 2022-05-13
赞同科技股份有限公司
View PDF0 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

However, the current mainstream diff algorithm uses recursive traversal to compare new and old text or all node elements for differential rendering. During operation, due to the need to maintain the stack structure and performance, the stack takes up a lot of memory, which slows down the rendering. speed, greatly reducing the efficiency of differential rendering updates

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Novel diff algorithm for realizing fast positioning and difference rendering updating
  • Novel diff algorithm for realizing fast positioning and difference rendering updating
  • Novel diff algorithm for realizing fast positioning and difference rendering updating

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0038] Embodiment 1: A new type of diff algorithm for fast positioning and differential rendering update for the front-end frame view layer (see Figure 1-5 )

[0039] This diff algorithm adds an identical unique identifier to all text nodes in the parsed and rendered text content and the corresponding overall tags generated by the rendered text nodes that can be recognized by the browser. When the text nodes or tags change , use the unique identifier to quickly locate the corresponding label or corresponding text node that needs to be updated by differential rendering, and update it by differential rendering to generate a new view interface.

[0040] Specifically, this diff algorithm includes the following steps:

[0041] (1) Obtain the text content that needs to be parsed and rendered;

[0042] The obtained text content is determined by the specific front-end framework language used. The template part is obtained in the vue framework language, and the render part is obtain...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

PUM

No PUM Login to view more

Abstract

The invention belongs to the technical field of computer operating systems and software development, and particularly relates to a novel diff algorithm for achieving rapid positioning and difference rendering updating for a front-end frame view layer and application of the novel diff algorithm. According to the diff algorithm, a same unique identifier is added to all text nodes in analyzed and rendered text content and a corresponding overall label which is generated after the text nodes are rendered and can be recognized by a browser; and quickly positioning the corresponding label or the corresponding text node which needs to be subjected to differential rendering updating by utilizing the unique identifier, and performing differential rendering updating on the corresponding label or the corresponding text node so as to generate a new view interface. According to the diff algorithm, the text nodes or labels needing to be subjected to difference rendering updating can be rapidly positioned, compared with an existing diff algorithm, the calculation amount is greatly reduced, a large amount of memory occupation is avoided, and the positioning and rendering updating efficiency is greatly improved.

Description

technical field [0001] The invention belongs to the technical field of computer operating systems and software development, and in particular relates to a novel diff algorithm for fast positioning and differential rendering update for the front-end frame view layer and its application. Background technique [0002] Usually, in the document object model (Document Object Model, referred to as DOM, is a standard programming interface for processing Extensible Markup Language recommended by the W3C organization, and is a structural part of a web page. When a web page is loaded, the DOM is rendered from the text content. The source code of the real screen, the DOM structure is an inverted tree structure, and there is only one tree vertex) During the rendering operation, most users will encounter such a problem, that is, sometimes we modify a certain data, if Direct rendering to the real DOM will cause redrawing and rearrangement of the entire DOM tree, resulting in a substantial ...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

Application Information

Patent Timeline
no application Login to view more
IPC IPC(8): G06F16/957G06F16/901G06F8/38G06F8/658
CPCG06F16/957G06F16/9027G06F8/658G06F8/38
Inventor 牟清宇王磊徐凌
Owner 赞同科技股份有限公司
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Try Eureka
PatSnap group products