Looking for breakthrough ideas for innovation challenges? Try Patsnap Eureka!

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

Pending Publication Date: 2021-11-23
济南浪潮数据技术有限公司
View PDF0 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0003] In the current front-end development field, the runtime memory analysis of JavaScript code is strongly dependent on the browser (some browsers do not provide this function), and the operation is complicated and not intuitive enough. JavaScript developers need to manually operate and manually analyze and locate problem codes. High technical requirements for front-end developers
Most junior and intermediate developers don’t pay attention to code performance when implementing the company’s business code, which makes the code have safety and quality risks. However, the learning cost of JavaScript code performance analysis is high, and the labor cost of performance optimization is also high.

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
  • Visual analysis and management method and system for JavaScript memory, equipment and storage medium
  • Visual analysis and management method and system for JavaScript memory, equipment and storage medium
  • Visual analysis and management method and system for JavaScript memory, equipment and storage medium

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0041] Embodiment 1 of the present invention proposes a JavaScript memory visualization analysis and management method. On the one hand, it can render real-time memory monitoring data when JavaScript code is running, save heap memory snapshots, and on the other hand, can draw the execution context stack (call stack) of JavaScript code. The relationship diagram also identifies problem nodes and their calling paths, so that JavaScript developers can easily and clearly understand the underlying operations during code execution and visually track changes in memory usage.

[0042] Such as figure 1 Provide a road map of JavaScript memory visualization analysis and management method according to Embodiment 1 of the present invention;

[0043] In step S101, the JavaScript target code is parsed to generate the corresponding abstract syntax tree and the scope of variables;

[0044]In this step, lexical analysis and syntax analysis are first performed on the JavaScript code to generate ...

Embodiment 2

[0066] Based on the JavaScript memory visualization analysis and management method proposed in Embodiment 1 of the present invention, Embodiment 2 of the present invention also proposes a JavaScript memory visualization analysis and management system, such as image 3 A schematic diagram of a JavaScript memory visualization analysis and management system according to Embodiment 2 of the present invention is given. The system includes a code pre-analysis device, a data collection device, and a visualization rendering device;

[0067] The code pre-parsing device is used for parsing the JavaScript target code, generating the corresponding abstract syntax tree and the scope of variables;

[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 to render the JavaScript heap memory usage in real time according to...

Embodiment 3

[0089] The invention also proposes a device comprising:

[0090] memory for storing computer programs;

[0091] When the processor is used to execute the computer program, the method steps are as follows:

[0092] In step S101, the JavaScript target code is parsed to generate the corresponding abstract syntax tree and the scope of variables;

[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, the 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 target code, and mark the scope of the p...

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 a visual analysis and management method and system for a JavaScript memory, equipment and a storage medium. The method comprises the following steps: analyzing a target code, and generating a corresponding abstract syntax tree and an action range of a variable; running the target code, and recording the execution context stack and heap memory snapshot information in the code running process; and according to the abstract syntax tree, executing the context stack and heap memory snapshot information, rendering the occupation condition of the heap memory in real time, and drawing a calling relation graph among variable nodes in the action range. The method further comprises the steps that according to a common memory leak tracking library, static analysis is conducted on target codes, and the action range of the problems possibly causing leak is marked. A visual analysis and management system, equipment and a storage medium are further provided based on the method, an effective way for conveniently and visually analyzing the problems of memory leak and the like is provided, the learning cost and the labor cost of code performance analysis and optimization are reduced, and a front-end development team can integrally control the code performance.

Description

technical field [0001] The invention belongs to the technical field of data analysis and management, and in particular relates to a JavaScript memory visualization analysis and management method, system, device and storage medium. Background technique [0002] JavaScript, referred to as JS, is a literal scripting language. It is a dynamically typed, weakly typed, prototype-based language with built-in support for types. Its interpreter is called the JavaScript engine, which is a part of the browser and is widely used as a client-side scripting language. It was first used on HTML (an application under the standard general markup language) webpage to add dynamic functions to HTML webpages. . [0003] In the current front-end development field, the runtime memory analysis of JavaScript code is strongly dependent on the browser (some browsers do not provide this function), and the operation is complicated and not intuitive enough. JavaScript developers need to manually operate ...

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/28G06F16/11G06F11/36G06F8/30G06F40/253
CPCG06F16/287G06F8/315G06F11/3636G06F16/128G06F40/253
Inventor 贾少龙符佳凤
Owner 济南浪潮数据技术有限公司
Features
  • Generate Ideas
  • Intellectual Property
  • Life Sciences
  • Materials
  • Tech Scout
Why Patsnap Eureka
  • Unparalleled Data Quality
  • Higher Quality Content
  • 60% Fewer Hallucinations
Social media
Patsnap Eureka Blog
Learn More