Re: Was ist der optimale Datentyp
- From: "Arno Garrels" <arno.garrels@xxxxxx>
- Date: Sat, 24 Nov 2007 18:52:21 +0100
Ralf Mimoun wrote:
Moin!
Moin Moin!
Es geht um die Verwaltung von Client-Connections eines TcpServers.
1. Das schnelle Hinzufügen zu der "Liste" der Clients ist wahnsinnig
wichtig weil sonst der Server weitere Verbindungsversuche ablehnt
(ListenBacklogQueue).
Wie viele Einträge wirds ca. geben,
Mehr als ca. 25 K Sockets geht nicht, zumindest auf W2K, also nicht
sehr viele.
und was verstehst Du unter "schnell"?
Je schneller um so besser ;-)
Allgemein fix wäre eine Hashtabelle.
Die wird doch bei jedem neuen Eintrag komplett neu aufgebaut, oder?
Ich hab mich jetzt so entschieden: In dem Objekt-Pool ist die Liste der
verbundenen Clients eine sortierte TObjectList, für die nicht aktiven
Client-Objekte wird TObjectList benutzt. Das scheint so erstmal ganz fix
zu sein, ist schonmal erheblich schneller als die alte Lösung ohne
Pool mit einer simplen TList. Für einen AVL-Baum müsste ich erstmal einen
Iterator schreiben und sonst noch einiges ändern, bin mir nicht sicher, ob
sich dieser Aufwand lohnt?
--
Arno Garrels
.
- Follow-Ups:
- Re: Was ist der optimale Datentyp
- From: Hans-Peter Diettrich
- Re: Was ist der optimale Datentyp
- References:
- Was ist der optimale Datentyp
- From: Arno Garrels
- Re: Was ist der optimale Datentyp
- From: Ralf Mimoun
- Was ist der optimale Datentyp
- Prev by Date: Re: Was ist der optimale Datentyp
- Next by Date: Re: Was ist der optimale Datentyp
- Previous by thread: Re: Was ist der optimale Datentyp
- Next by thread: Re: Was ist der optimale Datentyp
- Index(es):
Relevant Pages
|