Embedded browser CSS (Cascading Style Sheets) based engine parallelization method

An embedded browser and engine technology, applied in the field of CSS engine processing of cascading style sheets, can solve problems such as matching efficiency affecting page loading, no selector classification and DOM node grouping matching, and page parsing effects, so as to achieve a good user experience. effects, effects that reduce processing delays, and speed up responsiveness

Active Publication Date: 2015-11-04
INST OF ACOUSTICS CHINESE ACAD OF SCI +1
View PDF3 Cites 7 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

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
  • Embedded browser CSS (Cascading Style Sheets) based engine parallelization method
  • Embedded browser CSS (Cascading Style Sheets) based engine parallelization method
  • Embedded browser CSS (Cascading Style Sheets) based engine parallelization method

Examples

Experimental program
Comparison scheme
Effect test

Embodiment

[0043] The present invention provides a parallelized processing method based on the CSS engine of an embedded browser. The specific implementation example is as follows:

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

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

[0046] 3. The main thread continues to execute, 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 the style;

[0047] 4. After the style analysis is completed, the processing result 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 to match the selector;

[0049] 6. The selector matching thread will s...

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 present invention relates to the technical field of CSS engine processing of cascading style sheets of embedded browsers, and in particular to a processing method of CSS engine parallelization. Background technique [0002] Cascading Style Sheets (CSS), a standard defined and maintained by W3C, is a computer language used to add styles (fonts, spacing, 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 the CSS engine an essential part of embedded browsers. The function of the CSS engine is to parse out the CSS style description in the web page accurately and accurately, and for each DOM node (document object model, DOM tree is a tree structure generated by structured documents, DOM no...

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): 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