Visual analysis and management method and system for JavaScript memory, equipment and storage medium
A management method and memory technology, which is applied in the direction of file system, file system management, structured data retrieval, etc., can solve the problems of not paying attention to code performance, high learning cost, and high technical ability requirements of front-end developers, so as to reduce learning cost and labor costs, and the effect of improving code quality
- Summary
- Abstract
- Description
- Claims
- Application Information
AI Technical Summary
Problems solved by technology
Method used
Image
Examples
Example Embodiment
[0040] Example 1
[0041] Embodiment 1 of the present invention proposes a JavaScript memory visualization analysis and management method. On the one hand, the memory monitoring data when the JavaScript code is running can be rendered in real time, and the heap memory snapshot can be saved, and on the other hand, the execution context stack (call stack) of the JavaScript code can be drawn. The relationship graph identifies problem nodes and their calling paths, so that JavaScript developers can simply and clearly understand the underlying operations during code execution, and visually track changes in memory usage.
[0042] like figure 1 A road map of the JavaScript memory visualization analysis and management method in Embodiment 1 of the present invention;
[0043] In step S101, the JavaScript target code is parsed, and the corresponding abstract syntax tree and the scope of the variable are generated;
[0044]In this step, lexical analysis and syntax analysis are first pe...
Example Embodiment
[0065] Example 2
[0066] Based on the JavaScript memory visual analysis and management method proposed in Embodiment 1 of the present invention, the second embodiment of the present invention also proposes a JavaScript memory visual analysis and management system, such as image 3 A schematic diagram of a JavaScript memory visual analysis and management system according to Embodiment 2 of the present invention is given, and the system includes a code pre-parsing device, a data acquisition device, and a visual rendering device;
[0067] The code pre-parsing device is used to parse the JavaScript object code, and generate the corresponding abstract syntax tree and the scope of the variable;
[0068] The data acquisition device is used to run the JavaScript target code, record the execution context stack and heap memory snapshot information during the code running process,
[0069] The visual rendering device is used for rendering the JavaScript heap memory occupancy in real ti...
Example Embodiment
[0088] Example 3
[0089] The present invention also proposes a device, comprising:
[0090] memory for storing computer programs;
[0091] The processor implements the method steps as follows when executing the computer program:
[0092] In step S101, the JavaScript target code is parsed, and the corresponding abstract syntax tree and the scope of the variable are generated;
[0093] In this step, lexical analysis and syntax analysis are first performed on the JavaScript code to generate the corresponding AST abstract syntax tree, the scope of variables and the scope chain of functions.
[0094] Among them, Abstract Syntax Tree (AST): An abstract representation of the grammatical structure of the source code, which represents the grammatical structure of the programming language in the form of a tree, and each node on the tree represents a structure in the source code.
[0095] According to the common memory leak tracking library, statically analyze the JavaScript object c...
PUM
Abstract
Description
Claims
Application Information
- R&D Engineer
- R&D Manager
- IP Professional
- Industry Leading Data Capabilities
- Powerful AI technology
- Patent DNA Extraction
Browse by: Latest US Patents, China's latest patents, Technical Efficacy Thesaurus, Application Domain, Technology Topic.
© 2024 PatSnap. All rights reserved.Legal|Privacy policy|Modern Slavery Act Transparency Statement|Sitemap