[go: up one dir, main page]
More Web Proxy on the site http://driver.im/

CN111258586B - Fast application running and compiling method and device, electronic equipment and storage medium - Google Patents

Fast application running and compiling method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN111258586B
CN111258586B CN202010028256.9A CN202010028256A CN111258586B CN 111258586 B CN111258586 B CN 111258586B CN 202010028256 A CN202010028256 A CN 202010028256A CN 111258586 B CN111258586 B CN 111258586B
Authority
CN
China
Prior art keywords
file
style
page
fast application
compiled
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202010028256.9A
Other languages
Chinese (zh)
Other versions
CN111258586A (en
Inventor
董永清
孙良木
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Xiaomi Mobile Software Co Ltd
Original Assignee
Beijing Xiaomi Mobile Software Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Xiaomi Mobile Software Co Ltd filed Critical Beijing Xiaomi Mobile Software Co Ltd
Priority to CN202010028256.9A priority Critical patent/CN111258586B/en
Publication of CN111258586A publication Critical patent/CN111258586A/en
Application granted granted Critical
Publication of CN111258586B publication Critical patent/CN111258586B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/40Transformation of program code
    • G06F8/41Compilation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44521Dynamic linking or loading; Link editing at or after load time, e.g. Java class loading

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Stored Programmes (AREA)

Abstract

The disclosure relates to a method and a device for running and compiling a fast application, an electronic device and a storage medium, and belongs to the technical field of software. The method comprises the following steps: acquiring a js file and a style file of a page of a quick application, wherein the js file comprises a template object and a script object of the page, and the style file comprises a style object of the page; analyzing the js file and the style file by adopting a parallel processing mode; and outputting the page of the quick application based on the analysis results of the js file and the style file. In the embodiment of the disclosure, the file of the fast application page is divided into 2 parts of the js file and the style file, so that the js file and the style file can be analyzed in a parallel manner during loading, meanwhile, the volume of the js file is greatly reduced, and the loading speed of the fast application page is improved.

Description

Fast application running and compiling method and device, electronic equipment and storage medium
Technical Field
The present disclosure relates to the field of software technologies, and in particular, to a method and an apparatus for fast application running and compiling, an electronic device, and a storage medium.
Background
The quick application is a new application form, and the previous mobile phone end application mainly has two modes: web pages, program applications. The webpage does not need to be installed, but the user experience is not good; the program application experiences fluency but needs to be downloaded and installed from the application store. The fast application is a novel application which can still smoothly experience application contents without downloading and installing by a user.
Disclosure of Invention
The embodiment of the disclosure provides a method and a device for running and compiling a fast application, an electronic device and a storage medium, which can improve the loading speed of a fast application page. The technical scheme is as follows:
according to an aspect of the embodiments of the present disclosure, there is provided a fast application running method, including:
acquiring a js file and a style file of a page of a quick application, wherein the js file comprises a template object and a script object of the page, and the style file comprises a style object of the page;
analyzing the js file and the style file by adopting a parallel processing mode;
and outputting the page of the quick application based on the analysis results of the js file and the style file.
Optionally, the style file is a json file.
Optionally, the analyzing the js file and the style file by using a parallel processing manner includes:
and respectively processing the js file and the style file by adopting two threads.
Optionally, the processing the js file and the style file by using two threads respectively includes:
processing the js file by adopting a main thread of the fast application;
and processing the style file by adopting threads except the main thread in the fast application.
According to an aspect of the embodiments of the present disclosure, there is provided a fast application compiling method, including:
acquiring a file to be compiled, wherein the file to be compiled comprises template information, script information and style information of a page;
compiling the file to be compiled into a js file and a style file, wherein the js file comprises a template object and a script object of the page, and the style file comprises a style object of the page.
Optionally, the style file is a json file.
Optionally, the compiling the file to be compiled into a js file and a style file includes:
extracting style information in the file to be compiled;
compiling the style information obtained by extraction into the style file;
and compiling the extracted part of the file to be compiled into the js file.
According to an aspect of the embodiments of the present disclosure, there is provided a fast application running apparatus, including:
the system comprises an acquisition module, a storage module and a display module, wherein the acquisition module is configured to acquire a js file and a style file of a page of a fast application, the js file comprises a template object and a script object of the page, and the style file comprises a style object of the page;
the processing module is configured to analyze the js file and the style file in a parallel processing mode;
and the output module is configured to output the page of the fast application based on the js file and the analysis result of the style file.
Optionally, the style file is a json file.
Optionally, the processing module is configured to process the js file and the style file by using two threads respectively.
Optionally, the processing module includes:
a first processing submodule configured to process the js file with a main thread of the fast application;
and the second processing submodule is configured to process the style file by adopting threads except the main thread in the fast application.
According to an aspect of the embodiments of the present disclosure, there is provided a fast application compiling apparatus, the apparatus including:
the compiling method comprises the steps that an obtaining module is configured to obtain a file to be compiled, wherein the file to be compiled comprises template information, script information and style information of a page;
the compiling module is configured to compile the file to be compiled into a js file and a style file, the js file comprises a template object and a script object of the page, and the style file comprises a style object of the page.
Optionally, the style file is a json file.
Optionally, the compiling module includes:
the extraction submodule is configured to extract style information in the file to be compiled;
the compiling submodule is configured to compile the style information obtained by extraction into the style file; and compiling the extracted part of the file to be compiled into the js file.
According to another aspect of the embodiments of the present disclosure, there is provided an electronic apparatus including: a processor; a memory for storing processor-executable instructions; wherein the processor is configured to load and execute the executable instructions to implement the method as previously described.
According to another aspect of embodiments of the present disclosure, there is provided a computer-readable storage medium, in which instructions are capable of performing the method as described above when executed by a processor.
In the embodiment of the disclosure, the file of the fast application page is divided into 2 parts of the js file and the style file, so that the js file and the style file can be analyzed in a parallel manner during loading, meanwhile, the volume of the js file is greatly reduced, and the loading speed of the fast application page is improved.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and together with the description, serve to explain the principles of the disclosure.
FIG. 1 is a diagram illustrating an application scenario in accordance with an embodiment of the present disclosure;
FIG. 2 is a flow diagram illustrating a fast application running method in accordance with an illustrative embodiment;
FIG. 3 is a flow diagram illustrating a fast application compilation method in accordance with an exemplary embodiment;
FIG. 4 is a flow diagram illustrating a fast application compilation and execution method in accordance with an illustrative embodiment;
FIG. 5 is a schematic diagram illustrating a fast application execution device in accordance with an exemplary embodiment;
FIG. 6 is a block diagram illustrating an apparatus for fast application compilation according to an exemplary embodiment;
FIG. 7 is a block diagram illustrating an electronic device in accordance with an example embodiment.
Detailed Description
Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the exemplary embodiments below do not represent all implementations consistent with the present disclosure. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the disclosure, as detailed in the appended claims.
Fig. 1 is a diagram illustrating an application scenario according to an embodiment of the present disclosure. Referring to fig. 1, the application scenario includes: the system comprises a first electronic device 11 for fast application compiling, a second electronic device 12 for running fast applications, and a server 13 respectively connected with the first electronic device 11 and the second electronic device 12 through networks.
The first electronic device 11 may include various computing devices or other processing devices, such as a desktop computer, a notebook computer, and the like, and the device referred to by the first electronic device 11 may be a cloud device. The second electronic device 12 may be a handheld device, an in-vehicle device, a wearable device, etc. having wireless communication functionality, such as a cell phone.
In the embodiment of the present disclosure, the first electronic device 11 is responsible for compiling the fast application, the compiled fast application is uploaded to the server 13, and the second electronic device 12 acquires the fast application from the server 13 and loads and runs the fast application.
A fast application is an installation-free application, i.e. point-and-play. The pages of the fast application can be compiled by using a ux grammar file (namely, a ux file). The following is an example of a ux file:
ux has defined therein 2 components: part1.Ux, part2.Ux.
Figure BDA0002363259130000041
Figure BDA0002363259130000051
Figure BDA0002363259130000061
It can be seen that the information contained in a ux file mainly includes: template (template) information, script (script) information and style (style) information, where the information is a tag in the ux file, i.e. the ux file includes a template tag, a script tag and a style tag. It should be noted that the custom components part1 and part2 may be static pages, and therefore, only include template tags and style tags, and not script tags.
The ux file is compiled to obtain a java script (js) file, and the js file generally includes a template object, a script object, and a style object. The following is an example of a style object in a js file:
Figure BDA0002363259130000062
Figure BDA0002363259130000071
wherein class1, class2 and class are node names, that is, names of the aforementioned components, and universal Unique Identifier (uuid) is an Identifier of the node. For example, uuid is 2, and the node with the node name classr is the aforementioned page component index; uuid is 3, and the node with the node name of class1 is the self-defined component part1; uuid is 4, and the node with the node name class2 is the custom component part2.
In the loading process of the js file, all parts in the js file are loaded in sequence, namely, the template object, the script object and the style object which are declared in the js file are loaded in sequence. Usually, the style objects contained in the js file of a page are usually several or even tens, and one style object usually contains several rules, such as color, font, height, width, and the like, which results in that the js file is bulky and time-consuming to load, resulting in a slow loading speed of fast application pages.
FIG. 2 is a flow diagram illustrating a fast application running method in accordance with an exemplary embodiment. The method is executed by the first electronic device, and referring to fig. 2, the method includes the following steps:
in step 101, a js file and a style file of a page of a fast application are acquired.
Here, the js file includes a template object and a script object of the page, and the style file includes a style object of the page.
In step 102, the js file and the style file are parsed in a parallel processing manner.
In the process of loading the quick application, a template object is analyzed from the js file, and the template object is a tree structure formed by nodes in the page; meanwhile, a script object is analyzed from the js file to obtain a display window (ViewModel) instance, the instance is used for mapping the relationship between data and nodes, and the data can be from various sources, such as interface supply; a style object including a style of each node is parsed from the style file.
In step 103, based on the analysis result of the js file and the style file, a page of the fast application is output.
And rendering the template object by adopting the style of each node in the style object, and filling each node of the template object by adopting the data mapped by the script object to obtain the page of the quick application.
In the embodiment of the disclosure, the file of the fast application page is divided into 2 parts of the js file and the style file, so that the js file and the style file can be analyzed in a parallel manner during loading, meanwhile, the volume of the js file is greatly reduced, and the loading speed of the fast application page is improved.
Optionally, the style file is a js object notation (json) file.
In the implementation mode, as the json format is a format which is widely applied in a webpage (web), and all platforms and languages naturally integrate the capability of processing the json format file, the format file is compiled into the json format which can be processed by various platforms, and the practicability of the webpage is improved.
Optionally, parsing the js file and the style file by using a parallel processing manner includes:
two threads are used to process the js file and the style file, respectively.
In the implementation mode, the js file and the style file are respectively processed by 2 threads, so that the parallel processing of the two files is realized, and the loading operation of the fast application page is accelerated.
Optionally, two threads are used to process the js file and the style file respectively, including:
adopting the main thread of the fast application to process the js file;
and processing the style file by adopting threads except the main thread in the fast application.
In this implementation, the fast application typically includes a main thread and a plurality of other threads, and the main thread in the fast application is used for scheduling processing resources, such as scheduling other threads to process js files. However, since the processing amount of the js file in the present application is not large, if the main thread is used for scheduling and then the processing is performed by other threads, the processing cannot be accelerated, and instead, resource waste caused by interaction among the threads is caused, so that the main thread can be directly used for processing. The style file is generally large in processing capacity, and other threads except the main thread can be used for processing to form a parallel processing scheme, so that the loading speed is increased.
It is worth mentioning that the aforementioned steps 101-103 and the aforementioned optional steps can be combined arbitrarily.
FIG. 3 is a flowchart illustrating a fast application compilation method according to an exemplary embodiment. The method is executed by the aforementioned second electronic device, and referring to fig. 3, the method includes the following steps:
in step 201, a file to be compiled is obtained, where the file to be compiled includes template information, script information, and style information of a page.
In the embodiment of the present disclosure, the file to be compiled may be a ux file.
In a file to be compiled, template information is used for limiting the structure of a page, and the structure comprises the relationship of each node; the script information is used for indicating the relationship between the mapping data and the nodes; the style information is used to indicate a style of each node.
In step 202, the file to be compiled is compiled into a js file and a style file, wherein the js file comprises a template object and a script object of the page, and the style file comprises a style object of the page.
In the embodiment of the disclosure, the file of the fast application page is divided into 2 parts, namely the js file and the style file, so that the js file and the style file can be processed in a parallel manner and analyzed simultaneously when being loaded, and therefore, even if the volume of the style file is large, the running time of the fast application page is not too long, and meanwhile, the volume of the js file is reduced, so that the loading speed of the fast application page is improved.
Optionally, the style file is a json file.
Optionally, compiling the file to be compiled into a js file and a style file, including:
extracting style information in a file to be compiled;
compiling the extracted style information into a style file;
compiling the extracted part of the file to be compiled into a js file.
In the implementation mode, in the compiling process of the file to be compiled, the style information is independently extracted and compiled into the style file, and then the rest part (namely the template information and the script information) of the file to be compiled is compiled to obtain the js file, so that the separation of the style file and the js file is realized, and the preparation is made for the subsequent parallel processing.
It is worth mentioning that the aforementioned steps 201-202 and the aforementioned optional steps can be combined arbitrarily.
FIG. 4 is a flow diagram illustrating a fast application compilation and execution method in accordance with an exemplary embodiment. The method is executed by the aforementioned first electronic device and second electronic device, and referring to fig. 4, the method includes the following steps:
in step 301, a file to be compiled is obtained, where the file to be compiled includes template information, script information, and style information of a page.
See step 201 for a detailed description of the file to be compiled and the information contained therein.
In step 302, style information in the file to be compiled is extracted.
In the embodiment of the present disclosure, the electronic device may perform compilation of a file to be compiled by running a compiling tool, for example, a toolkit tool.
In the compiling process, parameters can be set in a compiling tool to extract the style information, for example, the beginning and the end of the style information in the ux file are used as setting parameters in the compiling tool, so that the compiling tool can extract the style information from the file to be compiled according to the beginning and the end of the style information.
Illustratively, the extraction of style information may be performed with "< style >" as a start and "</style >" as an end. When a plurality of nodes exist, a plurality of parts of style information can be extracted, and the style information can be compiled into the same style file in sequence.
In step 303, the extracted style information is compiled into a style file.
After step 302, the electronic device compiles the extracted style information into a style file through a compiling tool. The styles contained in the Style file may be in a Cascading Style Sheets (CSS) language, and the format of the Style file may be in a json format. The format of the compiled style file, such as the aforementioned json format, can be controlled by setting parameters in the compilation tool.
The following is an example of a style file in json format:
Figure BDA0002363259130000101
here, color is color, and ff0000, 00ff00, 0000ff are specific codes of color.
In this json file example, the style of each node may be identified using only the name of the node. In other implementations, the style of each node may also be identified jointly by the name of the node and uuid.
In step 304, the extracted part of the file to be compiled is compiled into a js file.
After step 302, the electronic device compiles the extracted portion of the file to be compiled (i.e., the template information and the script information) into a js file through a compiling tool.
Here, steps 301-304 are optional steps, which are performed using the first electronic device described above.
Certainly, in the compiling process, besides the js file and the json file, a map file for debugging may also be generated, which is not limited in the present application.
In step 305, a js file and a style file for a page of a fast application are obtained.
In the running process of the fast application, when the fast application needs to load one page (namely, the page), the style file needs to be acquired in addition to the js file.
These two files have the same name, for example, the two files of page index are: js and index cs json. Therefore, in this step, a js file and a json file having the same prefix as the name of the page may be acquired.
In step 306, the js file and the style file are processed separately using two threads.
Optionally, two threads are adopted to process the js file and the style file respectively, including:
adopting the main thread of the fast application to process the js file;
and processing the style file by adopting threads except the main thread in the fast application.
In the implementation mode, the electronic equipment analyzes a template object from the js file through a main thread, wherein the template object is a tree structure formed by nodes in the page; simultaneously, analyzing a script object from the js file to obtain a ViewModel instance, wherein the ViewModel instance is used for mapping the relationship between data and nodes; the electronic equipment analyzes the style object from the style file through other threads, the style object is stored in the electronic equipment through registration and used when a page is rendered subsequently, and the style object comprises a style of each node.
In the implementation mode, the style file is processed by other threads, so that the main thread can have more time slices for processing the js file, and the application construction is accelerated.
In step 307, based on the result of parsing the js file and the style file, a page of the fast application is output.
And rendering the template object by adopting the style of each node in the style object, and filling each node of the template object by adopting the data mapped by the script object to obtain the page of the quick application.
Here, steps 305-307 are performed using the second electronic device described above. It should be noted that the first electronic device and the second electronic device may be the same electronic device.
In the embodiment of the disclosure, the file of the fast application page is divided into the js file and the style file, so that on one hand, the volume of the js file is reduced, the construction of the page is accelerated, on the other hand, the style object is extracted from the js file, the coupling between the style object and the js file is released, and the analysis and registration processes of the style file are accelerated. Meanwhile, the style file is extracted from the js file for processing, so that the style file can be conveniently expanded and the like in the subsequent process, and the design of the quick application page is more flexible.
Illustratively, the method may further comprise: receiving an operation instruction aiming at the style file; and operating the style file based on the operating instruction. The operation file includes adding content, deleting content, modifying content, etc., and the operation instruction may be provided by an interface in the electronic device. In this way, the style file can be subjected to the expansion processing as described above.
Fig. 5 is a schematic structural diagram illustrating a fast application execution apparatus according to an exemplary embodiment. The device has the function of implementing the first electronic device in the above method embodiment, and the function may be implemented by hardware, or may be implemented by hardware executing corresponding software. As shown in fig. 5, the apparatus includes: an acquisition module 401, a processing module 402 and an output module 403.
The acquiring module 401 is configured to acquire a js file and a style file of a page of the fast application, where the js file includes a template object and a script object of the page, and the style file includes a style object of the page;
a processing module 402 configured to analyze the js file and the style file in a parallel processing manner;
and an output module 403 configured to output a page of the fast application based on the result of the parsing of the js file and the style file.
Optionally, the style file is a json file.
Optionally, the processing module 402 is configured to process the js file and the style file using two threads, respectively.
Optionally, the processing module 402 includes:
a first processing submodule 421 configured to process a js file with a main thread of the fast application;
a second processing submodule 422 configured to process the style file using a thread other than the main thread in the fast application.
Fig. 6 is a schematic structural diagram illustrating a fast application compiling apparatus according to an exemplary embodiment. The device has the function of implementing the second electronic device in the above method embodiment, and the function may be implemented by hardware, or may be implemented by hardware executing corresponding software. As shown in fig. 6, the apparatus includes: an acquisition module 501 and a compiling module 502.
An obtaining module 501, configured to obtain a file to be compiled, where the file to be compiled includes template information, script information, and style information of a page;
the compiling module 502 is configured to compile a file to be compiled into a js file and a style file, the js file including a template object and a script object of a page, and the style file including a style object of the page.
Optionally, the style file is a json file.
Optionally, the compiling module 502 includes:
the extraction submodule 521 is configured to extract style information in the file to be compiled;
a compiling sub-module 522 configured to compile the extracted style information into a style file; compiling the extracted part of the file to be compiled into a js file.
Fig. 7 is a block diagram illustrating an electronic device 600 according to an example embodiment, where the electronic device 600 is a first electronic device or a second electronic device, the electronic device may include: a processor 601, a receiver 602, a transmitter 603, a memory 604, and a bus 605.
The processor 601 includes one or more processing cores, and the processor 601 executes various functional applications and information processing by running software programs and modules.
The receiver 602 and the transmitter 603 may be implemented as one communication component, which may be a communication chip.
The memory 604 is coupled to the processor 601 by a bus 605.
The memory 604 may be used to store at least one instruction that the processor 601 is configured to execute to implement the various steps in the above-described method embodiments.
Further, memory 604 may be implemented by any type or combination of volatile or non-volatile storage devices, including, but not limited to: magnetic or optical disks, electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), static Random Access Memory (SRAM), read-only memory (ROM), magnetic memory, flash memory, programmable read-only memory (PROM).
In an exemplary embodiment, a computer readable storage medium is further provided, in which at least one instruction, at least one program, a code set, or a set of instructions is stored, and the at least one instruction, the at least one program, the code set, or the set of instructions is loaded and executed by the processor to implement the fast application running method or the fast application compiling method provided by the above-mentioned method embodiments.
Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the disclosure following, in general, the principles of the disclosure and including such departures from the present disclosure as come within known or customary practice within the art to which the disclosure pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the disclosure being indicated by the following claims.
It will be understood that the present disclosure is not limited to the precise arrangements described above and shown in the drawings and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.

Claims (12)

1. A fast application running method, the method comprising:
acquiring a js file and a style file of a page of a quick application, wherein the js file comprises a template object and a script object of the page, and the style file comprises a style object of the page; the template object is a tree structure formed by nodes in the page; the script object is a presentation window instance; the style object includes a style of each node;
adopting the main thread of the fast application to analyze the js file, and adopting threads other than the main thread in the fast application to analyze the style file;
and outputting the page of the quick application based on the analysis results of the js file and the style file.
2. The method of claim 1, wherein the style file is a json file.
3. A fast application compilation method, characterized in that it comprises:
acquiring a file to be compiled, wherein the file to be compiled comprises template information, script information and style information of a page;
compiling the file to be compiled into a js file and a style file, wherein the js file comprises a template object and a script object of the page, and the style file comprises a style object of the page; the template object is a tree structure formed by nodes in the page; the script object is a presentation window instance; the style object includes a style of each node;
and the js file is analyzed by adopting a main thread of the fast application, and the style file is analyzed by adopting a thread in the fast application, which is not the main thread.
4. The method of claim 3, wherein the style file is a json file.
5. The method according to claim 3 or 4, wherein the compiling the file to be compiled into a js file and a style file comprises:
extracting style information in the file to be compiled;
compiling the style information obtained by extraction into the style file;
compiling the extracted part of the file to be compiled into the js file.
6. A fast application running apparatus, comprising:
the system comprises an acquisition module, a setting module and a display module, wherein the acquisition module is configured to acquire a js file and a style file of a page of a quick application, the js file comprises a template object and a script object of the page, and the style file comprises a style object of the page; the template object is a tree structure formed by nodes in the page; the script object is a presentation window instance; the style object includes a style of each node;
the processing module is configured to analyze the js file by adopting a main thread of the fast application and analyze the style file by adopting threads except the main thread in the fast application;
and the output module is configured to output the page of the fast application based on the js file and the analysis result of the style file.
7. The apparatus of claim 6, wherein the style file is a json file.
8. A fast application compilation apparatus, the apparatus comprising:
the compiling method comprises the steps that an obtaining module is configured to obtain a file to be compiled, wherein the file to be compiled comprises template information, script information and style information of a page;
the compiling module is configured to compile the file to be compiled into a js file and a style file, wherein the js file comprises a template object and a script object of the page, and the style file comprises a style object of the page; the template object is a tree structure formed by nodes in the page; the script object is a presentation window instance; the style object includes a style of each node;
and the js file is analyzed by adopting a main thread of the fast application, and the style file is analyzed by adopting a thread in the fast application, which is not the main thread.
9. The apparatus of claim 8, wherein the style file is a json file.
10. The apparatus of claim 8 or 9, wherein the compiling module comprises:
the extraction submodule is configured to extract style information in the file to be compiled;
the compiling sub-module is configured to compile the style information obtained by extraction into the style file; and compiling the extracted part of the file to be compiled into the js file.
11. An electronic device, characterized in that the electronic device comprises:
a processor;
a memory for storing processor-executable instructions;
wherein the processor is configured to load and execute the executable instructions to implement the method of claim 1 or 2, or to implement the method of any one of claims 3 to 5.
12. A computer-readable storage medium, wherein instructions in the computer-readable storage medium, when executed by a processor, are capable of performing the method of claim 1 or 2, or of performing the method of any of claims 3 to 5.
CN202010028256.9A 2020-01-10 2020-01-10 Fast application running and compiling method and device, electronic equipment and storage medium Active CN111258586B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010028256.9A CN111258586B (en) 2020-01-10 2020-01-10 Fast application running and compiling method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010028256.9A CN111258586B (en) 2020-01-10 2020-01-10 Fast application running and compiling method and device, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN111258586A CN111258586A (en) 2020-06-09
CN111258586B true CN111258586B (en) 2023-04-18

Family

ID=70948619

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010028256.9A Active CN111258586B (en) 2020-01-10 2020-01-10 Fast application running and compiling method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN111258586B (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106980504A (en) * 2017-03-28 2017-07-25 腾讯科技(深圳)有限公司 A kind of application development method and its instrument, equipment
CN109857971A (en) * 2019-02-01 2019-06-07 天津字节跳动科技有限公司 Page rendering method and apparatus
CN110333912A (en) * 2019-07-11 2019-10-15 百度在线网络技术(北京)有限公司 A kind of method, apparatus and computer readable storage medium of small routine data pre-fetching
CN114138372A (en) * 2021-12-06 2022-03-04 中国工商银行股份有限公司 Front-end component loading method and device

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7685168B2 (en) * 2007-08-31 2010-03-23 International Business Machines Corporation Removing web application flicker using AJAX and page templates

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106980504A (en) * 2017-03-28 2017-07-25 腾讯科技(深圳)有限公司 A kind of application development method and its instrument, equipment
CN109857971A (en) * 2019-02-01 2019-06-07 天津字节跳动科技有限公司 Page rendering method and apparatus
CN110333912A (en) * 2019-07-11 2019-10-15 百度在线网络技术(北京)有限公司 A kind of method, apparatus and computer readable storage medium of small routine data pre-fetching
CN114138372A (en) * 2021-12-06 2022-03-04 中国工商银行股份有限公司 Front-end component loading method and device

Also Published As

Publication number Publication date
CN111258586A (en) 2020-06-09

Similar Documents

Publication Publication Date Title
CN111680253B (en) Page application data packet generation method and device, computer equipment and storage medium
US9182953B2 (en) Hybrid dynamic code compiling device, method, and service system thereof
CN109597618B (en) Program development method, program development device, computer device, and storage medium
CN106909361B (en) Web development method and device based on template engine
CN108388454B (en) Method and device for dynamically providing JS (JavaScript) compatible script content and terminal equipment
CN109145235B (en) Method and device for analyzing webpage and electronic equipment
CN110727429B (en) Front-end page generation method, device and equipment
CN111831384A (en) Language switching method and device, equipment and storage medium
US20180025162A1 (en) Application program analysis apparatus and method
CN111290996A (en) Document format conversion method, device, equipment and readable storage medium
CN111309332A (en) File content on-demand loading method and device, electronic equipment and storage medium
CN108885544B (en) Front-end page internationalized processing method, application server and computer-readable storage medium
CN111562907A (en) Conversion method and system of user-defined interface data
CN111258586B (en) Fast application running and compiling method and device, electronic equipment and storage medium
CN113296752A (en) Method, system, device and storage medium for generating API document
CN112632425A (en) Method, device, equipment and storage medium for generating offline resource file
CN109509467B (en) Code generation method and device
CN117539471A (en) Method and system for multiplexing existing resources by low-code development platform
CN112764757A (en) Applet processing method, device, equipment and storage medium
CN117008920A (en) Engine system, request processing method and device, computer equipment and storage medium
CN115543324A (en) Method, device, equipment and medium for generating interactive interface
CN115292641A (en) Page generation method, device, server and storage medium
CN112394972B (en) Cloud application publishing method, device, equipment and storage medium
CN109284097B (en) Method, device, system and storage medium for realizing complex data analysis
CN112800078A (en) Lightweight text labeling method, system, equipment and storage medium based on javascript

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant