A Parallelization Method Based on Embedded Browser CSS Engine

An embedded browser and engine technology, applied in the field of cascading style sheet CSS engine processing, can solve the problems of matching efficiency affecting page loading, no selector classification and DOM node group matching, page parsing, etc., to achieve a good user experience Effects, effects that reduce processing latency and speed up response

Active Publication Date: 2018-08-14
INST OF ACOUSTICS CHINESE ACAD OF SCI +1
View PDF3 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0004] The existing CSS engine technology processes style sheets in a thread-blocking manner, and page parsing is affected when parsing CSS styles; in addition, in the process of selector matching, the existing CSS engine does not perform group matching on selector classification and DOM nodes , the efficiency of matching affects the loading of the page

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
  • A Parallelization Method Based on Embedded Browser CSS Engine
  • A Parallelization Method Based on Embedded Browser CSS Engine
  • A Parallelization Method Based on Embedded Browser CSS Engine

Examples

Experimental program
Comparison scheme
Effect test

Embodiment

[0043] The present invention provides a kind of processing method based on embedded browser CSS engine parallelization, and concrete embodiment is as follows:

[0044] 1. When the browser parses the page, it first enters the main thread of page parsing;

[0045] 2. When the main thread encounters a CSS style sheet or image resource during execution, the newly opened thread starts to load the resource;

[0046] 3. The main thread continues to execute, and when it encounters a CSS style, it starts to call the CSS style parser for style analysis, and at the same time assigns a unique ID number to this style;

[0047] 4. After the style analysis is completed, the processing results will be delivered to the main thread, and the main thread will be arranged according to the ID number;

[0048] 5. After the page parsing in the main thread encounters HTML, the page parsing ends, and the CSS selector is called for selector matching;

[0049] 6. The selector type will be scanned in th...

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 provides an embedded browser CSS (Cascading Style Sheets) based engine parallelization method, which comprises the following steps: 101) starting a main thread to carry out page parsing; 102) establishing a new thread to download external style sheets or picture resources received in a current page parsing process; 103) establishing another new thread, and parsing a received CSS style by the new thread, finishing the page parsing by the main thread after a period of time, and finishing style parsing by other new threads, wherein one CSS style is parsed by one new thread; 104) starting a selector matching thread, inputting the output results of the page parsing and the style parsing into the selector matching thread to finish the matching of DOM (Document Object Model) nodes and a selector, and finally generating a rendering tree. The method independently carries out parallel processing on three aspects including CSS engine resource acquisition, style parsing and selection matching so as to shorten latency time in the page parsing process of a browser and quicken a webpage loading speed.

Description

technical field [0001] The invention relates to the technical field of cascading style sheet CSS engine processing of an embedded browser, in particular to a parallel processing method of the CSS engine. Background technique [0002] Cascading Style Sheets (CSS for short) is a standard defined and maintained by W3C, a computer language used to add styles (fonts, spacing and colors, etc.) to structured documents such as HTML documents or XML applications. [0003] Compared with the performance of traditional HTML, CSS can precisely control the position and layout of objects in web pages at the pixel level. The widespread use of CSS specifications and the widespread use of embedded browsers make CSS engines an essential part of embedded browsers. The function of the CSS engine is to accurately parse the CSS style description in the web page, and analyze each DOM node (document object model, DOM tree is a tree structure generated by a structural document, and a DOM node is a n...

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
Patent Type & Authority Patents(China)
IPC IPC(8): G06F9/48G06F17/30
Inventor 郭志川刘秀秀胡琳琳
Owner INST OF ACOUSTICS CHINESE ACAD OF SCI
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