on 10-23-2014 7:03 PM
Folks,
I have a project with several Flex windows, wherein I have a significant dependency on use of dictionaries.
In most cases I am modifying the contents of the dictionaries on a frequent basis to maintain a notion
of "most recent" information. This information is then used to enrich, map or derive other content on the
way through the Flex window.
My project grows in memory fast.....out of control actually. I suspect [now] that I am being wreckless
with my dictionary use. What rules of thumb should I follow? Do I need to do some kind of periodic
"cleanup" of my dictionaries (copy, delete, recreate)?
Looking for advice on best practices here from people who have been there and faced this.
Thanks,
Michael
I agree with Alice - you may want to have a look at Event Cache. You can also reference the output window that a Flex is creating from within the Flex - to look at previous values, for example.
As for using dictionaries, yes you do need to do clean up - and remember that the memory isn't released until the flex 'exits'. So if you create and delete lots of dictionaries in the flex, the delete won't take effect until the flex completely finishes processing the event.
Also: don't just keep adding things to the dictionary without ever deleting - or you will have an infinitely growing dictionary.
If you thing you are following all those rules and still having problems, give us more details or share a sample of the CCL. Or conversely, describe what you need to do and someone may be able to show you an example of a "safe" (and efficient) way to do it.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks Jeff. I have stayed with dictionaries for now (just too far down the road to rework using Event Cache strategy) and I am being a better citizen about adhering to use of "remove" function
on dictionary members prior to replacing them. I've also moved as much as I can away from windows and toward use of streams.
Lastly, I've upgraded to ESP 5.1 SP04 PL03 on the server side of things (but not my Studio on Windows) and am getting messages about copyRecord being deprecated. What's the replacement for this function going forward?
Thanks,
Michael
Hi Michael,
Have you looked at using the Event Cache data structure? From your description, you might find that to be a better choice.
Here are some links to information about Event Caches:
Thanks,
Alice
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.