Hello Arno,
It seems to work perfectly now with your advice! See:
www.iqproxyserver.comis being served with the beta version using ICS
TCacheTree.
Thanks a lot,
SZ
On Tue, Dec 6, 2011 at 18:56, Arno Garrels arno.garr...@gmx.de wrote:
Fastream Technologies wrote:
FLastInsertedNode :=
Fastream Technologies wrote:
It seems to work perfectly now with your advice! See:
www.iqproxyserver.comis being served with the beta version using ICS
TCacheTree.
Performance increased?
Thanks a lot,
You are welcome.
--
Arno Garrels
--
To unsubscribe or change your settings for TWSocket
Yes it is indeed faster! Hard to measure but in the old version, during
deletion it used to take n/2 time. n is the number of files which could
reach up to 100K!
Best Regards,
SZ
On Wed, Dec 7, 2011 at 17:57, Arno Garrels arno.garr...@gmx.de wrote:
Fastream Technologies wrote:
It seems to
Hi Arno,
procedure TCacheTree.Insert(
Key : String;
Data : Pointer;
Len : Integer;
TimeStamp : TDateTime = MinDT;
Expires : TDateTime = MinDT;
UpdateTime: Boolean = True;
UpdateData: Boolean = True);
var
CacheNode,
- Original Message -
From: Fastream Technologies ga...@fastream.com
To: ICS support mailing twsocket@elists.org
Sent: Tuesday, December 06, 2011 4:40 PM
Subject: Re: [twsocket] Converting a cache to AVL tree
I still get occasional AVs in shut down. It is in cacheNode deletion
Fastream Technologies wrote:
FLastInsertedNode := CacheNode; // Fastream
Not a good idea since the reference may change or the node
be removed.
--
Arno Garrels
--
To unsubscribe or change your settings for TWSocket mailing list
please goto
On Sun, Dec 4, 2011 at 11:05, Arno Garrels arno.garr...@gmx.de wrote:
- Original Message -
From: Fastream Technologies ga...@fastream.com
To: ICS support mailing twsocket@elists.org
Sent: Sunday, December 04, 2011 7:16 AM
Subject: Re: [twsocket] Converting a cache to AVL tree
:
- Original Message -
From: Fastream Technologies ga...@fastream.com
To: ICS support mailing twsocket@elists.org
Sent: Sunday, December 04, 2011 7:16 AM
Subject: Re: [twsocket] Converting a cache to AVL tree
The component I tried to use is TCacheTree. It has a timeout argument
] Converting a cache to AVL tree
The component I tried to use is TCacheTree. It has a timeout
argument for each added item. I do not want any timers or any
timeouts yet liked the component. Is there a way to omit
expiration. I will use my own code for it.
TCacheTree doesn't use any timer
Message -
From: Fastream Technologies ga...@fastream.com
To: ICS support mailing twsocket@elists.org
Sent: Sunday, December 04, 2011 7:16 AM
Subject: Re: [twsocket] Converting a cache to AVL tree
The component I tried to use is TCacheTree. It has a timeout
argument for each added
Fastream Technologies wrote:
Let me elaborate the issue: In our caches, we may have duplicate
URLs.
Then TCacheTree doesn't fit.
As I wrote yesterday, the Key (in your case the URL) must be unique,
no way around, it is the primary key.
However there may exist multiple, different Keys/URLs
Okay, let's do it one entry per URL. Now the TList recording and deleting
afterwards in OnList does NOT work. Gives AV. What is the proper way? Can
you help us with some consultancy? Please let me know privately:
ga...@fastream.com.
Best Regards,
SZ
On Mon, Dec 5, 2011 at 13:47, Arno Garrels
FYI, this is the code:
RAMFileCacheIndex-OnList = CacheTreeOnListForRAM;
RAMFileCacheIndex-ListTree();
for(int i = RAMFileCacheIndexList-Count - 1; i = 0; --i)
deleteFileFromRAMCacheWRTIndex((RAMFileCache*)RAMFileCacheIndexList-Items[i],
false); (basically deletes the data
Ok, let's go step by step: How do I get the TCacheNode of the last inserted
one? First() or Last()?
SZ
On Mon, Dec 5, 2011 at 16:38, Fastream Technologies ga...@fastream.comwrote:
FYI, this is the code:
RAMFileCacheIndex-OnList = CacheTreeOnListForRAM;
RAMFileCacheIndex-ListTree();
Hi again,
I think the problem is in the delete routine:
bool __fastcall ProxyCache::deleteFileFromRAMCacheWRTIndex(RAMFileCache
*bufferFileCache, bool alreadyMarkedAsToDelete)
{
if(!bufferFileCache)
return false;
if(bufferFileCache-cacheTreeNode)
{
Fastream Technologies wrote:
Ok, let's go step by step: How do I get the TCacheNode of the last
inserted one?
Not possible, you only can get the oldest, why do you need that?
I could easily add property Latest which should be the Last in
the secondary tree with the TimeStamps. It is not
Fastream Technologies wrote:
FYI, this is the code:
RAMFileCacheIndex-OnList = CacheTreeOnListForRAM;
RAMFileCacheIndex-ListTree();
for(int i = RAMFileCacheIndexList-Count - 1; i = 0; --i)
deleteFileFromRAMCacheWRTIndex((RAMFileCache*)RAMFileCacheIndexList-Items[i],
false);
Arno Garrels wrote:
Fastream Technologies wrote:
FYI, this is the code:
RAMFileCacheIndex-OnList = CacheTreeOnListForRAM;
RAMFileCacheIndex-ListTree();
for(int i = RAMFileCacheIndexList-Count - 1; i = 0; --i)
TCacheNode = class(TAvlTreeNode)
private
FKey : String;
FData: Pointer;
FLen : Integer;
FIdxRef : TCacheIdxNode;
public
constructor Create(Key: String; Data: Pointer; Len: Integer);
destructor Destroy; override;
, 2011 7:16 AM
Subject: Re: [twsocket] Converting a cache to AVL tree
The component I tried to use is TCacheTree. It has a timeout argument for
each added item. I do not want any timers or any timeouts yet liked the
component. Is there a way to omit expiration. I will use my own code
Subject: Re: [twsocket] Converting a cache to AVL tree
The component I tried to use is TCacheTree. It has a timeout
argument for each added item. I do not want any timers or any
timeouts yet liked the component. Is there a way to omit
expiration. I will use my own code for it.
TCacheTree
, Dec 4, 2011 at 11:05, Arno Garrels arno.garr...@gmx.de
wrote:
- Original Message -
From: Fastream Technologies ga...@fastream.com
To: ICS support mailing twsocket@elists.org
Sent: Sunday, December 04, 2011 7:16 AM
Subject: Re: [twsocket] Converting a cache to AVL tree
On Sun, Dec 4, 2011 at 11:40, Arno Garrels arno.garr...@gmx.de wrote:
Traversing the tree is only possible with method ListTree
and assigning an OnList event handler.
Could you give an example to traversing for the firstly inserted n elements?
Regards,
SZ
--
To unsubscribe or change your
I do not understand why it is async to traverse a list of nodes in RAM! It
ruins the program flow very much. Any solution?
Regards,
SZ
On Sun, Dec 4, 2011 at 12:36, Fastream Technologies ga...@fastream.comwrote:
On Sun, Dec 4, 2011 at 11:40, Arno Garrels arno.garr...@gmx.de wrote:
Okay, I now see your point, it is not async yet recursive.
Regards,
SZ
On Sun, Dec 4, 2011 at 12:52, Fastream Technologies ga...@fastream.comwrote:
I do not understand why it is async to traverse a list of nodes in RAM! It
ruins the program flow very much. Any solution?
Regards,
SZ
On
Fastream Technologies wrote:
Do you mean the tree self-destructs nodes and I will be notified of
it to delete?
You are notified before the class removes and frees a node, i.e method
Remove() triggers event OnFreeData and afterwards frees the node. The class
doesn't own Data but its nodes, so
Fastream Technologies wrote:
On Sun, Dec 4, 2011 at 11:40, Arno Garrels arno.garr...@gmx.de
wrote:
Traversing the tree is only possible with method ListTree
and assigning an OnList event handler.
Could you give an example to traversing for the firstly inserted n
elements?
Not
Ok but how do I delete with respect to a data-property?? We use regex and
string comparison for this! If you can help me with it, I will appreciate.
We can be sponsors for this feature. I think we can live with OnList way
but really need to be able to delete with respect to data...
Regards,
SZ
On
Fastream Technologies wrote:
Ok but how do I delete with respect to a data-property??
One needs one linked tree for each search key, if you
have to iterate over a tree in order to find something a list
would likely be faster. But if can live with slow deletions
maybe you can use
Arno,
The deletions occur once in a day/week or so, when the end admin user
clicks a button in GUI. It is not a part of every second cache operation.
What is the easiest/safest way to delete by iteration?
a. Implement a new TCacheTree with IPv6 AVLPointerTree?
b. A very slow workaround for the
How about us to make a list of pointers in onlist and then remove?
Best Regards,
SZ
On Sun, Dec 4, 2011 at 15:24, Fastream Technologies ga...@fastream.comwrote:
Arno,
The deletions occur once in a day/week or so, when the end admin user
clicks a button in GUI. It is not a part of every
Fastream Technologies wrote:
How about us to make a list of pointers in onlist and then remove?
Yes, I'd just override DoListNode, something like (untested):
TMyCache = class(TCacheTree)
private
FDeleteList: TList;
FCondition: string;
protected
procedure DoListNode(Node:
Arno Garrels wrote:
Fastream Technologies wrote:
How about us to make a list of pointers in onlist and then remove?
Yes, I'd just override DoListNode, something like (untested):
Wait! It has to be tested, might not work, building a StringList
with the keys however will work.
--
To
Fastream Technologies wrote:
Hello,
I wonder if there is an easy way to do this? How does one achieve no
timeout in ICS avl tree?
Please be more specific, AFAIR there's no timeout in any ICS AVL tree.
BTW: Also have a look at the new TIcsAvlPointerTree and TIcsAvlObjectTree
in the IPv6
The component I tried to use is TCacheTree. It has a timeout argument for
each added item. I do not want any timers or any timeouts yet liked the
component. Is there a way to omit expiration. I will use my own code for it.
Best Regards,
SZ
On Sat, Dec 3, 2011 at 18:54, Arno Garrels
35 matches
Mail list logo