Determine the amount of memory a data window occupies

Source: Internet
Author: User
Tags memory usage query
Data
Determine the memory used by a DataWindow or datastore

It is often necessary to know how much memory a DataWindow or datastore are using to prevent an "out of memory" error or to Facilitate debugging. When the memory usage are known, processing of data or the retrieval of data can be stopped when a maximum limit is reached .

To determine the amount of virtual memory used by a DataWindow or datastore, the Storage attribute is used. It can be invoked from either of the two methods below:

Dot notation
Dw_control. Object.DataWindow.Storage

Describe
Dw_control. Describe ("Datawindow.storage")

Both cases return a string value of bytes of storage used.

Note-dw_control can refer to either a DataWindow or datastore

An example usage would is:

Canceling a query that uses too much storage. You can check this property in the script for the Retrieverow event in the DataWindow control and cancel a query if it is Consuming too much storage. Note-this example'll inject performance degradation by increasing the retrieve time.






Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.