Autor Beitrag
ralfi
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 153



BeitragVerfasst: So 21.09.03 09:03 
Ich habe mehrere IdHTTPs auf der Form, jeder von denen mit einem Interval von 2-10 Sekunden eine GET-Anfrage an deselben Server mit verschiedenen Parametern sendet. Soweit ok. Doch es passiert machmal, dass mehrere IdHTTPs gleichzeitig aktiv sind. In diesem Fall dauert die GET-Anfrage zu lange.

Kann ich die Komponenten irgenwie optimieren, um das zu verhindern?
Ich habe DSL-Verbindung.
matze
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 4613
Erhaltene Danke: 24

XP home, prof
Delphi 2009 Prof,
BeitragVerfasst: So 21.09.03 10:43 
pack die Gets in threats rein !

_________________
In the beginning was the word.
And the word was content-type: text/plain.
ralfi Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 153



BeitragVerfasst: Mo 22.09.03 13:27 
Danke für den Tip!

Aber wie mache ich das? Habe mit Threads noch nie was gemacht.

Ich habe zwar schon ein Paar Beiträge über Thread gelesen, aber nicht viel verstanden :-( Wie erstelle ich einen thread mit IdHTTP-Kompo, GETs sendet? Für ein kurzes Code-Beispiel werde ich sehr dankbar :-)
MaxiTB
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 679

Win2000, WinXp, Workbench ;-)
D7 Ent, VS2003 Arch.
BeitragVerfasst: Mo 22.09.03 15:03 
Titel: Lucki sei dank ...
Threads ... sehr mysteriös, viel gefürchtet aber eigentlich simple:

www.delphi-forum.de/viewtopic.php?t=16627

_________________
Euer Mäxchen
Wer früher stirbt, ist länger tot.
ralfi Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 153



BeitragVerfasst: Mi 24.09.03 21:06 
Also, ich habe die GETs in Threads verpackt, aber trotzdem, funktionieren diese nicht unabhängig von einander. Ein GET wartet, bis der andere fertig inaktiv ist. :-(

Kann mir jemand von Experten helfen, es richtig zu machen? Ein entsprechenden Code-Beispiel vielleicht? Ich habe alle Tutorial, was gefunden hab, durchgelesen, alles ausprobiert, geht nicht. Es lauft mit dem Thread genauso wie ohne ihn.

Bitte um Hilfe!
MaxiTB
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 679

Win2000, WinXp, Workbench ;-)
D7 Ent, VS2003 Arch.
BeitragVerfasst: Do 25.09.03 11:23 
Titel: Warte mal ...
Kann es vielleicht sein, daß der Server nur eine GET vom gleichen Rechner gleichzeit akzeptiert (Anti-DoS) ?

Wäre durchaus logisch - und ich würde das sofort so konfigurieren, wenn ich der Admin wäre :wink:

Also vielleicht liegt das Problem ja gar nicht bei dir; hast du irgendwelche Infos über den Server ? Vielleicht dort eine Kontaktperson ?

_________________
Euer Mäxchen
Wer früher stirbt, ist länger tot.
matze
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 4613
Erhaltene Danke: 24

XP home, prof
Delphi 2009 Prof,
BeitragVerfasst: Do 25.09.03 14:41 
schau mal ob es geht, wenn du 2 httpclient kompos aufs form pappst.
vielleicht kann eine http kompo immer nur einen get ausführen.

_________________
In the beginning was the word.
And the word was content-type: text/plain.
focus
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 187

XP, 2k, 98, Me
D6 Prof
BeitragVerfasst: Do 25.09.03 15:05 
ich denke mal das du das mit den threads jetzt so gemacht hast:
eine komponente auf dein form, und in den threads die anfragen...
kann garnicht schneller werden... du hast schliesslich den gleichen flaschenhals..
wenn du die komponenten erst im thread "erzeugst", sprich zu 20 threads 20 zugehörige https und die alle nebeneinander laufen lässt sollte es gehen...
(der grundgedanke siehe vorredner mit den 2 komponenten auf einem form)
gruss
michael
ralfi Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 153



BeitragVerfasst: Do 25.09.03 18:43 
Danke euch allen! Gabs geschaft!

Ich habe wie focus@ geschrieben hat, IdHTTPs zur Laufzeit erzeugt, und es klappt wunderbar!

Danke!

MfG
Ralfi