CN1311338C - Method for reducing holding of internal memory in using table - Google Patents

Method for reducing holding of internal memory in using table Download PDF

Info

Publication number
CN1311338C
CN1311338C CNB200410064320XA CN200410064320A CN1311338C CN 1311338 C CN1311338 C CN 1311338C CN B200410064320X A CNB200410064320X A CN B200410064320XA CN 200410064320 A CN200410064320 A CN 200410064320A CN 1311338 C CN1311338 C CN 1311338C
Authority
CN
China
Prior art keywords
records
data
recording interval
buffer memory
memory
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
CNB200410064320XA
Other languages
Chinese (zh)
Other versions
CN1740967A (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.)
Huawei Technologies Co Ltd
Original Assignee
Huawei Technologies 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 Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Priority to CNB200410064320XA priority Critical patent/CN1311338C/en
Publication of CN1740967A publication Critical patent/CN1740967A/en
Application granted granted Critical
Publication of CN1311338C publication Critical patent/CN1311338C/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Abstract

The present invention discloses a method for reducing the occupation of an internal memory when a table is used in order to solve the problem that large quantity of system memory is occupied when large quantity of information is displayed in the prior art. In the method, table records are memorized in a local buffer memory which only preserves one part of records. When the table needs to display the records, the record range to be displayed is calculated out first, and then the records are read from the local buffer memory according to the range; the records are provided for the table to display when found; when the records can not be found, the records are read from memory media to refresh the local buffer memory, and the local buffer memory is made to contain the records to be displayed and returns the records to the table. When the present invention is used and a table is used for displaying large quantity of information, just little system memory needs occupying.

Description

A kind of method that in form uses, reduces committed memory
Technical field
The present invention relates to computer technology, relate in particular to a kind of method that in form uses, reduces committed memory.
Background technology
In the expression way of the interface of computing machine, form is very common expression way.Because this mode is directly perceived, contain much information, the comparison between not only can writing down easily, and easy to operate is so the machine word of the main flow developing instrument of making peace is all supported form at present.
But also just because of the containing much information of form, when existing thousands of in the form even will have a strong impact on form during up to ten thousand records, even the efficient of program, can cause the operating system instability when serious.The reason that this situation mainly contains following three aspects appears:
1, preserving each bar record in the form all is to want committed memory, whole records that will show when displayed record are read the table internal memory from storage medium, when record is a lot of, will take a large amount of internal memories, thereby cause the problems referred to above, this also is the main cause that form takies a large amount of internal memories under the form big data quantity;
2, the implementation difference of form also can produce the big problem of efficient and EMS memory occupation; For example the form of the form of MFC and JAVA is just significantly different.
3, developer's programming experience and skill problem.
For the 2nd reason, because various language are with the developing instrument emphasis and realize all different, and general all by special company or organize as much as possible and optimize, thus for the developer in this point poor effect of will exploiting potentialities in this; As for the 3rd reason, there is not actual effective and efficient manner owing to relate to developer individual's problems such as ability yet.Therefore, become effective settling mode at the 1st reason.
Summary of the invention
The object of the present invention is to provide a kind of method that in form uses, reduces committed memory, when showing big data quantity information, have the problem that takies Installed System Memory in a large number to solve prior art.
Realize technical scheme of the present invention:
A kind of method that reduces committed memory in form uses is characterized in that comprising the steps:
A, determine the current recording interval that will show of form viewable portion;
Whether there have been the data in the described recording interval in the buffer memory of B, judgement preservation displayed record,, otherwise carried out step C if then carry out step D;
C, from the storage medium of storage displayed record, read the described buffer memory of all Refresh Datas in the described recording interval at least;
D, from described buffer memory, read all data in the described recording interval to showing form.
The present invention uses local cache to preserve the current partial record that will show of form, when keeping the original mode of operation of form, significantly reduced the internal memory that form takies, thereby solved under the big data quantity situation because form takies the other problems that a large amount of internal memories may cause.
Description of drawings
Fig. 1 is the synoptic diagram that concerns between buffer memory, data set and form;
Fig. 2 is a process flow diagram of the present invention.
Embodiment
Though a large amount of records is arranged in the form, but the viewable portion of form is limited, thereby can only shows part of records.Therefore, the present invention does not want displayed record to read internal memory all when the form displayed record.
The present invention is not placed on charting in the form, but is placed in the buffer memory of system this locality, and local cache is only preserved partial record.When form is wanted displayed record, at first calculate the recording interval that will show, for example to show the 1st to 30 row, the the 0th to 7 row etc., according to this scope reading and recording in locally buffered, show if get record then submit to form, afterwards if can not find record, then refresh local cache and make it to comprise the record that will show, return to form afterwards and show from the storage medium reading and recording.Therefore, local cache becomes the bridge block between form and the data set, and the relation between them as shown in Figure 1.
Consult shown in Figure 2ly, concrete treatment scheme is as follows:
Step 10: blocked operation viewpoint on form, as drag scroll bar on the form etc.
Step 20: obtain current operation viewpoint and calculate the recording interval that the form viewable portion shows.Recording interval is represented with the sign of initial row and the sign of going eventually.
Step 30: judge that whether local cache comprises all data in the described recording interval, in this way, then carry out step 50, otherwise carry out step 40.
Step 40: trigger the cache flush incident, refresh local cache from the storage medium reading of data, comprise all data in the described recording interval in these data that read by cache size.
Step 50: from after the buffer memory page read data in the described recording interval to form.
By above-mentioned mode, though form will show that how many data are uncontrollable, the demonstration because form fetches data from local cache, and the local cache size can be controlled, so the memory size that takies just can be controlled, also just avoided producing the excessive problem of EMS memory occupation.For example there are 100,000 records to show, but the data of 200 records in the local cache, local cache only refreshes as required, and then form reality has only taken the internal memory of 200 records.
The local cache size can dispose according to the demand of reality, but local cache can be preserved the data of all records of form viewable portion at least.Because the user may page turning in form, check operations such as or next bar, cause the viewable portion record change of form.If have only the data of viewable portion in the buffer memory, local cache will frequently be refreshed, may produce efficiency thus, so the scope of local cache keeping records is bigger than visual range.
For how the scope of the record that computation sheet will show has nothing in common with each other for different developing instrument methods.With Java is example, and the scope that window shows oneself is calculated by Java itself.Be example with Java below: the false code that provides an implementation:
The local cache size is set, deposits variable PageSize in;
The record that calculating will show by how many row, deposits variable R owCount in altogether;
With variable R owCount the line number of form is set, shows form;
When the viewable portion of form refreshes is getValueAt method with in the call list lattice model, or during the getTableCellRendererComponent method of form renderer, because the recording interval that form will show is calculated by Java oneself, and only the record that will show is called two above-mentioned methods.So carry out following processing in any one method therein:
There is the record that will show in the if local cache
This record is returned to form to be shown
else
Refresh local cache, make it to comprise the record that will show, this record is returned to form show
Obviously, those skilled in the art can carry out various changes and modification to method of the present invention and not break away from the spirit and scope of the present invention.Like this, if of the present invention these are revised and modification belongs within the scope of claim of the present invention and equivalent technologies thereof, then the present invention also is intended to comprise these changes and modification interior.

Claims (4)

1, a kind of method that reduces committed memory in form uses is characterized in that comprising the steps:
A, determine the current recording interval that will show of form viewable portion;
Whether there have been all data in the described recording interval in the buffer memory of B, judgement preservation displayed record,, otherwise carried out step C if then carry out step D;
C, from the storage medium of storage displayed record, read the described buffer memory of all Refresh Datas in the described recording interval at least;
D, from described buffer memory, read all data in the described recording interval to showing form.
2, the method for claim 1 is characterized in that, among the step C, by cache size reading of data from storage medium, and comprises all interior data of described recording interval in the data that read.
3, require 1 or 2 described methods as claim, it is characterized in that described cache size is configurable.
4, the method for claim 1 is characterized in that, described recording interval is represented with the sign of initial row and the sign of termination row.
CNB200410064320XA 2004-08-23 2004-08-23 Method for reducing holding of internal memory in using table Active CN1311338C (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CNB200410064320XA CN1311338C (en) 2004-08-23 2004-08-23 Method for reducing holding of internal memory in using table

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CNB200410064320XA CN1311338C (en) 2004-08-23 2004-08-23 Method for reducing holding of internal memory in using table

Publications (2)

Publication Number Publication Date
CN1740967A CN1740967A (en) 2006-03-01
CN1311338C true CN1311338C (en) 2007-04-18

Family

ID=36093371

Family Applications (1)

Application Number Title Priority Date Filing Date
CNB200410064320XA Active CN1311338C (en) 2004-08-23 2004-08-23 Method for reducing holding of internal memory in using table

Country Status (1)

Country Link
CN (1) CN1311338C (en)

Families Citing this family (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN100550023C (en) * 2008-01-24 2009-10-14 中兴通讯股份有限公司 A kind of main memory database table deposit and method that loads of realizing
CN101876971A (en) * 2010-06-22 2010-11-03 北京伟库电子商务科技有限公司 Report form showing method and device
CN102411493A (en) * 2010-09-21 2012-04-11 金蝶软件(中国)有限公司 Universal selection assisting system and method
CN102214163B (en) * 2011-06-28 2016-08-03 用友网络科技股份有限公司 Buffer memory management method and cache management device
CN103164401A (en) * 2011-12-08 2013-06-19 航天信息软件技术有限公司 Page tabular display method
CN103218197B (en) * 2013-04-26 2016-09-28 安科智慧城市技术(中国)有限公司 A kind of methods, devices and systems of Dynamic Announce data
CN105549936B (en) * 2015-12-21 2020-05-19 腾讯科技(深圳)有限公司 Data table display method and device
CN109496307A (en) * 2017-05-27 2019-03-19 深圳配天智能技术研究院有限公司 Method, terminal and the teaching machine of robot stacking function user interface display data
CN107704576B (en) * 2017-09-30 2020-03-31 厦门海迈科技股份有限公司 Data display optimization method and device, terminal equipment and storage medium
CN109783757B (en) * 2018-12-29 2021-04-27 360企业安全技术(珠海)有限公司 Method, device and system for rendering webpage, storage medium and electronic device
CN109857742B (en) * 2019-01-18 2021-03-02 烽火通信科技股份有限公司 Big data virtual table rapid display method and system

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US4584574A (en) * 1983-09-14 1986-04-22 International Business Machines Corporation Information display and editing system
US4742344A (en) * 1984-12-20 1988-05-03 International Business Machines Corp. Digital display system with refresh memory for storing character and field attribute data
US5126747A (en) * 1989-10-31 1992-06-30 Ramtek Corporation Method and apparatus for displaying radar data
JPH1011262A (en) * 1996-06-26 1998-01-16 Fuji Electric Co Ltd Picture displaying method for display device
JP2000215020A (en) * 1999-01-22 2000-08-04 Mitsubishi Electric Corp Data display device

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US4584574A (en) * 1983-09-14 1986-04-22 International Business Machines Corporation Information display and editing system
US4742344A (en) * 1984-12-20 1988-05-03 International Business Machines Corp. Digital display system with refresh memory for storing character and field attribute data
US5126747A (en) * 1989-10-31 1992-06-30 Ramtek Corporation Method and apparatus for displaying radar data
JPH1011262A (en) * 1996-06-26 1998-01-16 Fuji Electric Co Ltd Picture displaying method for display device
JP2000215020A (en) * 1999-01-22 2000-08-04 Mitsubishi Electric Corp Data display device

Also Published As

Publication number Publication date
CN1740967A (en) 2006-03-01

Similar Documents

Publication Publication Date Title
CN1030804C (en) Method and apparatus utiliging multi-demensional data icons
CN1311338C (en) Method for reducing holding of internal memory in using table
US6281986B1 (en) Method for browsing electronically stored information
CN112506509B (en) Method and related device for realizing that tree control supports big data rendering
US20060061581A1 (en) Sparse refresh of display
US7460136B2 (en) Efficient scaling of image data in graphics display systems
US9431074B2 (en) Shiftable memory supporting bimodal storage
US8643674B2 (en) Rendering changed portions of composited images
CN111524211B (en) Handwriting erasing method, handwriting erasing device and handwriting erasing equipment
CN1716264A (en) Methods, systems and program products for annotating system traces with control program information and presenting annotated system traces
CN106897311B (en) Database batch updating method, data reduction log generating method and storage device
JP4246848B2 (en) Frame buffer memory system that reduces page loss when expressed using color and z-buffers
CN1073287A (en) Visual calendar
CN116529775A (en) Method and apparatus for ray tracing merge function call
CN111459593A (en) Drawing method, device and equipment
CN110928877A (en) Hbase-based image tile storage method, device, equipment and medium
CN102270179A (en) Data storing and processing method and system for CAD (Computer Assisted Drafting) system based on fragments
CN110750587B (en) Method for processing large amount of high-speed logs of debugging equipment
CN101030203A (en) Method for data paging display
US20090187719A1 (en) Data backup method for logical volume manager
CN111694759B (en) Flash memory management method and flash memory
CN111522512A (en) Optimized cold and hot data separation method and device, computer equipment and storage medium
US7333106B1 (en) Method and apparatus for Z-buffer operations
US20030193501A1 (en) Incremental resolution changes in multi-resolution meshes with update records
CN1029650C (en) Method and circuit for character-type Chinese-character display

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant