首页 > 开发 > 综合 > 正文

判断一个数据窗口占用的内存量

2024-07-21 02:08:58
字体:
来源:转载
供稿:网友

determine the memory used by a datawindow or datastore

it is often necessary to know how much memory a datawindow or datastore is using to prevent an "out of memory" error or to facilitate debugging. when the memory usage is 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 in bytes of storage used.

note - dw_control can refer to either a datawindow or datastore

an example usage would be:

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 will inject performance degradation by increasing the retrieve time.

 


 

收集最实用的网页特效代码!

发表评论 共有条评论
用户名: 密码:
验证码: 匿名发表