|
Antwort |
Registriert seit: 9. Jun 2003 390 Beiträge Delphi 7 Professional |
#1
Hallo
ich hab ein Array vom type record im record hab ich 20strings und 10Integer das array ist 250 lang wenn ich jetzt alles fülle dauert es sehr sehr lange - kann ich das irgend wie beschleunigen? i := 1 to 200 do begin arry[i].str1 := 'str'; arry[i].str2 := 'str'; arry[i].str3 := 'str'; usw.... end; |
Zitat |
Registriert seit: 21. Jun 2002 602 Beiträge |
#2
Benutze in deinem Record nicht normale (Huge-)Strings, sondern solche, die in der Länge begrenzt sind.
Delphi-Quellcode:
Solche Strings sind sehr viel schneller, denn die Speicheroperationen, die ausgeführt werden müssen, um ihnen etwas zuzuweisen, beschränken sich auf simples Speicherkopieren.
type
TMyRecord = record str1: String[128]; // String mit max. 128 Zeichen str2: String[32]; // String mit max. 32 Zeichen end; [edit]Schon schlimm, wenn man kein Pascal mehr kann und Semikolons (!) vergisst ... [/edit]
-- Crucifixion?
-- Yes. -- Good. Out of the door, line on the left, one cross each. |
Zitat |
Registriert seit: 23. Jun 2003 416 Beiträge Delphi 2006 Professional |
#3
Zitat von HomerGER:
wenn ich jetzt alles fülle dauert es sehr sehr lange
Wenn ich das ausprobiere (PII, 300 MHz) und die Zeit mit gettickcount messe komme ich auf Werte zwischen 3 und 9 ms. Sonst kann ich mich nur d3gs Vorschlag anschließen.
"Electricity is actually made up of extremely tiny particles called electrons, that you cannot see with the naked eye unless you have been drinking." (Dave Barry)
|
Zitat |
Registriert seit: 9. Jun 2003 390 Beiträge Delphi 7 Professional |
#4
ich vergass
es wird eine textdatei aus ne dll geladen lange hmm so 1-2 min |
Zitat |
Registriert seit: 10. Jun 2002 Ort: Unterhaching 11.412 Beiträge Delphi 12 Athens |
#5
Wo kommen denn die Werte her, weil mal kurz 5000 Strings zu setzen eigentlich nicht lange dauert.
......
Daniel Lizbeth
Ich bin nicht zurück, ich tue nur so |
Zitat |
Registriert seit: 9. Jun 2003 390 Beiträge Delphi 7 Professional |
#6
ok
ein record
Delphi-Quellcode:
das array dann
Type
ButtonConfig = Record //Config Button Daten titel_s : String; xpversion_s : String; menu_i : Integer; header_i : Integer; button_i : Integer; datenlesen_i : Integer; datenschreiben_i : Integer; datenauswerten_i : Integer; datenelemente_i : Integer; datenstatus_i : Integer; datenxpspeichern_i : Integer; datenbackupspeichern_i : Integer; datenwertspeichern_i : Integer; datenfuellen_i : Integer; datenfrei_i : Integer; // Soll auf Freigabe geprüft werden datenverweis_i : Integer; //Gib es ein Verweis auf ein anderen Item root1_s : String; key1_s : String; wert1_s : String; wert2_s : String; wert3_s : String; wert4_s : String; wert5_s : String; wert6_s : String; wert7_s : String; wert8_s : String; wert9_s : String; wert10_s : String; root2_s : String; key2_s : String; wert21_s : String; wert22_s : String; wert23_s : String; wert24_s : String; wert25_s : String; root3_s : String; key3_s : String; wert31_s : String; wert32_s : String; wert33_s : String; wert34_s : String; wert35_s : String; root4_s : String; key4_s : String; wert41_s : String; wert42_s : String; wert43_s : String; wert44_s : String; wert45_s : String; root5_s : String; key5_s : String; wert51_s : String; wert52_s : String; wert53_s : String; wert54_s : String; wert55_s : String; suchwert1_s : String; //Wenn nach etwas zusätzlichen gesucht werden mus xp_default1_s : String; xp_default2_s : String; xp_default3_s : String; homer_default1_s : String; homer_default2_s : String; homer_default3_s : String; xp_soll_s : String; homer_soll_s : String; element1_s : String; element2_s : String; element3_s : String; element4_s : String; element5_s : String; element6_s : String; element7_s : String; element8_s : String; element9_s : String; element10_s : String; element11_s : String; element12_s : String; element_hint1_s : String; element_hint2_s : String; end; g_button_cfg_ar : Array[1..250] of ButtonConfig; die daten werden aus einer textdatei die in einer dll ist geladen [edit=sakura] [delphi]-Tags gesetzt. Mfg, sakura[/edit] |
Zitat |
Registriert seit: 10. Jun 2002 Ort: Unterhaching 11.412 Beiträge Delphi 12 Athens |
#7
Eigentlich interessierte mich eher der Code, wo Du die Textdatei auseinander nimmst. Da dürfte die meiste Zeit verloren gehen
...... P.S.: Du solltest Deine Delphi Codes in die [ delphi ] und [/ delphi ] Tags (ohne Leerzeichen) setzen
Daniel Lizbeth
Ich bin nicht zurück, ich tue nur so |
Zitat |
Registriert seit: 9. Jun 2003 390 Beiträge Delphi 7 Professional |
#8
Code:
//******************************************************************************
//Haupt_Unit //Confign aus Text.dll Procedure Button_Cfg_Lesen_BCU(); var lib_h : THandle; res_s : TResourceStream; config_sl : TStringList; i : Integer; j : Integer; pos_i : Integer; xp_version_s : String; begin //Config Array löschen Config_Array_Loeschen_BCU; //Dll laden lib_h := LoadLibrary(PChar(g_sprachen_path_s + g_programm_sprache_s + '_Shell.dll')); config_sl := TStringList.Create; config_sl.Clear; res_s := NIL; if (lib_h <> 0) then begin try res_s := TResourceStream.Create(lib_h, 'Button_Cfg', RT_RCDATA); //In StringList laden config_sl.LoadFromStream(res_s); for i := 1 to k_max_xp_tweak_i do begin for j := 0 to config_sl.Count - 1 do begin //Version auslesen if (Pos(IntToStr(i) + '_HXPTT_XPVersion=', config_sl.Strings[j]) = 1) then begin pos_i := Pos('=', config_sl.Strings[j]); xp_version_s := Copy(config_sl.Strings[j], pos_i + 1, Length(config_sl.Strings[j])); end; //XP Version prüfen if (XP_Version_Pruefen_GU(xp_version_s) = True) then begin //Daten ins Array schreiben //Titel if (Pos(IntToStr(i) + '_HXPTT_Titel=', config_sl.Strings[j]) = 1) then begin pos_i := Pos('=', config_sl.Strings[j]); g_button_cfg_ar[i].titel_s := Copy(config_sl.Strings[j], pos_i + 1, Length(config_sl.Strings[j])); end; //XPVersion if (Pos(IntToStr(i) + '_HXPTT_XPVersion=', config_sl.Strings[j]) = 1) then begin pos_i := Pos('=', config_sl.Strings[j]); g_button_cfg_ar[i].xpversion_s := Copy(config_sl.Strings[j], pos_i + 1, Length(config_sl.Strings[j])); end; //Menu Nr. if (Pos(IntToStr(i) + '_HXPTT_Menu=', config_sl.Strings[j]) = 1) then begin pos_i := Pos('=', config_sl.Strings[j]); g_button_cfg_ar[i].menu_i := StrToInt(Copy(config_sl.Strings[j], pos_i + 1, Length(config_sl.Strings[j]))); end; //Header Nr. if (Pos(IntToStr(i) + '_HXPTT_Header=', config_sl.Strings[j]) = 1) then begin pos_i := Pos('=', config_sl.Strings[j]); g_button_cfg_ar[i].header_i := StrToInt(Copy(config_sl.Strings[j], pos_i + 1, Length(config_sl.Strings[j]))); end; //Button Nr. if (Pos(IntToStr(i) + '_HXPTT_Button=', config_sl.Strings[j]) = 1) then begin pos_i := Pos('=', config_sl.Strings[j]); g_button_cfg_ar[i].button_i := StrToInt(Copy(config_sl.Strings[j], pos_i + 1, Length(config_sl.Strings[j]))); end; //Daten Lesen Option if (Pos(IntToStr(i) + '_HXPTT_Daten_Lesen=', config_sl.Strings[j]) = 1) then begin pos_i := Pos('=', config_sl.Strings[j]); g_button_cfg_ar[i].datenlesen_i := StrToInt(Copy(config_sl.Strings[j], pos_i + 1, Length(config_sl.Strings[j]))); end; //Daten Schreiben Option if (Pos(IntToStr(i) + '_HXPTT_Daten_Schreiben=', config_sl.Strings[j]) = 1) then begin pos_i := Pos('=', config_sl.Strings[j]); g_button_cfg_ar[i].datenschreiben_i := StrToInt(Copy(config_sl.Strings[j], pos_i + 1, Length(config_sl.Strings[j]))); end; //Daten Auswerten Option if (Pos(IntToStr(i) + '_HXPTT_Daten_Auswerten=', config_sl.Strings[j]) = 1) then begin pos_i := Pos('=', config_sl.Strings[j]); g_button_cfg_ar[i].datenauswerten_i := StrToInt(Copy(config_sl.Strings[j], pos_i + 1, Length(config_sl.Strings[j]))); end; //Daten Elemente Option if (Pos(IntToStr(i) + '_HXPTT_Daten_Elemente=', config_sl.Strings[j]) = 1) then begin pos_i := Pos('=', config_sl.Strings[j]); g_button_cfg_ar[i].datenelemente_i := StrToInt(Copy(config_sl.Strings[j], pos_i + 1, Length(config_sl.Strings[j]))); end; //Daten Status Option if (Pos(IntToStr(i) + '_HXPTT_Daten_Status=', config_sl.Strings[j]) = 1) then begin pos_i := Pos('=', config_sl.Strings[j]); g_button_cfg_ar[i].datenstatus_i := StrToInt(Copy(config_sl.Strings[j], pos_i + 1, Length(config_sl.Strings[j]))); end; //Daten XPSpeichern Option if (Pos(IntToStr(i) + '_HXPTT_Daten_XPSpeichern=', config_sl.Strings[j]) = 1) then begin pos_i := Pos('=', config_sl.Strings[j]); g_button_cfg_ar[i].datenxpspeichern_i := StrToInt(Copy(config_sl.Strings[j], pos_i + 1, Length(config_sl.Strings[j]))); end; //Daten BackupSpeichern Option if (Pos(IntToStr(i) + '_HXPTT_Daten_BackupSpeichern=', config_sl.Strings[j]) = 1) then begin pos_i := Pos('=', config_sl.Strings[j]); g_button_cfg_ar[i].datenbackupspeichern_i := StrToInt(Copy(config_sl.Strings[j], pos_i + 1, Length(config_sl.Strings[j]))); end; //Daten Wert Speichern Option if (Pos(IntToStr(i) + '_HXPTT_Daten_WertSpeichern=', config_sl.Strings[j]) = 1) then begin pos_i := Pos('=', config_sl.Strings[j]); g_button_cfg_ar[i].datenwertspeichern_i := StrToInt(Copy(config_sl.Strings[j], pos_i + 1, Length(config_sl.Strings[j]))); end; //Daten Füllen Option if (Pos(IntToStr(i) + '_HXPTT_Daten_Fuellen=', config_sl.Strings[j]) = 1) then begin pos_i := Pos('=', config_sl.Strings[j]); g_button_cfg_ar[i].datenfuellen_i := StrToInt(Copy(config_sl.Strings[j], pos_i + 1, Length(config_sl.Strings[j]))); end; //Daten auf Freigabe prüfen if (Pos(IntToStr(i) + '_HXPTT_Daten_Freigabe=', config_sl.Strings[j]) = 1) then begin pos_i := Pos('=', config_sl.Strings[j]); g_button_cfg_ar[i].datenfrei_i := StrToInt(Copy(config_sl.Strings[j], pos_i + 1, Length(config_sl.Strings[j]))); end; //Auf anderen Daten ein Verweis if (Pos(IntToStr(i) + '_Daten_Verweis=', config_sl.Strings[j]) = 1) then begin pos_i := Pos('=', config_sl.Strings[j]); g_button_cfg_ar[i].datenverweis_i := StrToInt(Copy(config_sl.Strings[j], pos_i + 1, Length(config_sl.Strings[j]))); end; //Key1 if (Pos(IntToStr(i) + '_HXPTT_Root1=', config_sl.Strings[j]) = 1) then begin pos_i := Pos('=', config_sl.Strings[j]); g_button_cfg_ar[i].root1_s := Copy(config_sl.Strings[j], pos_i + 1, Length(config_sl.Strings[j])); end; //Path1 if (Pos(IntToStr(i) + '_HXPTT_Key1=', config_sl.Strings[j]) = 1) then begin pos_i := Pos('=', config_sl.Strings[j]); g_button_cfg_ar[i].key1_s := Copy(config_sl.Strings[j], pos_i + 1, Length(config_sl.Strings[j])); end; //Wert1 if (Pos(IntToStr(i) + '_HXPTT_Wert1=', config_sl.Strings[j]) = 1) then begin pos_i := Pos('=', config_sl.Strings[j]); g_button_cfg_ar[i].wert1_s := Copy(config_sl.Strings[j], pos_i + 1, Length(config_sl.Strings[j])); end; //Wert2 if (Pos(IntToStr(i) + '_HXPTT_Wert2=', config_sl.Strings[j]) = 1) then begin pos_i := Pos('=', config_sl.Strings[j]); g_button_cfg_ar[i].wert2_s := Copy(config_sl.Strings[j], pos_i + 1, Length(config_sl.Strings[j])); end; //Wert3 if (Pos(IntToStr(i) + '_HXPTT_Wert3=', config_sl.Strings[j]) = 1) then begin pos_i := Pos('=', config_sl.Strings[j]); g_button_cfg_ar[i].wert3_s := Copy(config_sl.Strings[j], pos_i + 1, Length(config_sl.Strings[j])); end; //Wert4 if (Pos(IntToStr(i) + '_HXPTT_Wert4=', config_sl.Strings[j]) = 1) then begin pos_i := Pos('=', config_sl.Strings[j]); g_button_cfg_ar[i].wert4_s := Copy(config_sl.Strings[j], pos_i + 1, Length(config_sl.Strings[j])); end; //Wert5 if (Pos(IntToStr(i) + '_HXPTT_Wert5=', config_sl.Strings[j]) = 1) then begin pos_i := Pos('=', config_sl.Strings[j]); g_button_cfg_ar[i].wert5_s := Copy(config_sl.Strings[j], pos_i + 1, Length(config_sl.Strings[j])); end; //Wert6 if (Pos(IntToStr(i) + '_HXPTT_Wert6=', config_sl.Strings[j]) = 1) then begin pos_i := Pos('=', config_sl.Strings[j]); g_button_cfg_ar[i].wert6_s := Copy(config_sl.Strings[j], pos_i + 1, Length(config_sl.Strings[j])); end; //Wert7 if (Pos(IntToStr(i) + '_HXPTT_Wert7=', config_sl.Strings[j]) = 1) then begin pos_i := Pos('=', config_sl.Strings[j]); g_button_cfg_ar[i].wert7_s := Copy(config_sl.Strings[j], pos_i + 1, Length(config_sl.Strings[j])); end; //Wert8 if (Pos(IntToStr(i) + '_HXPTT_Wert8=', config_sl.Strings[j]) = 1) then begin pos_i := Pos('=', config_sl.Strings[j]); g_button_cfg_ar[i].wert8_s := Copy(config_sl.Strings[j], pos_i + 1, Length(config_sl.Strings[j])); end; //Wert9 if (Pos(IntToStr(i) + '_HXPTT_Wert9=', config_sl.Strings[j]) = 1) then begin pos_i := Pos('=', config_sl.Strings[j]); g_button_cfg_ar[i].wert9_s := Copy(config_sl.Strings[j], pos_i + 1, Length(config_sl.Strings[j])); end; //Wert10 if (Pos(IntToStr(i) + '_HXPTT_Wert10=', config_sl.Strings[j]) = 1) then begin pos_i := Pos('=', config_sl.Strings[j]); g_button_cfg_ar[i].wert10_s := Copy(config_sl.Strings[j], pos_i + 1, Length(config_sl.Strings[j])); end; //Key2 if (Pos(IntToStr(i) + '_HXPTT_Root2=', config_sl.Strings[j]) = 1) then begin pos_i := Pos('=', config_sl.Strings[j]); g_button_cfg_ar[i].root2_s := Copy(config_sl.Strings[j], pos_i + 1, Length(config_sl.Strings[j])); end; //Path2 if (Pos(IntToStr(i) + '_HXPTT_Key2=', config_sl.Strings[j]) = 1) then begin pos_i := Pos('=', config_sl.Strings[j]); g_button_cfg_ar[i].key2_s := Copy(config_sl.Strings[j], pos_i + 1, Length(config_sl.Strings[j])); end; //Wert21 if (Pos(IntToStr(i) + '_HXPTT_Wert21=', config_sl.Strings[j]) = 1) then begin pos_i := Pos('=', config_sl.Strings[j]); g_button_cfg_ar[i].wert21_s := Copy(config_sl.Strings[j], pos_i + 1, Length(config_sl.Strings[j])); end; //Wert22 if (Pos(IntToStr(i) + '_HXPTT_Wert22=', config_sl.Strings[j]) = 1) then begin pos_i := Pos('=', config_sl.Strings[j]); g_button_cfg_ar[i].wert22_s := Copy(config_sl.Strings[j], pos_i + 1, Length(config_sl.Strings[j])); end; //Wert23 if (Pos(IntToStr(i) + '_HXPTT_Wert23=', config_sl.Strings[j]) = 1) then begin pos_i := Pos('=', config_sl.Strings[j]); g_button_cfg_ar[i].wert23_s := Copy(config_sl.Strings[j], pos_i + 1, Length(config_sl.Strings[j])); end; //Wert24 if (Pos(IntToStr(i) + '_HXPTT_Wert24=', config_sl.Strings[j]) = 1) then begin pos_i := Pos('=', config_sl.Strings[j]); g_button_cfg_ar[i].wert24_s := Copy(config_sl.Strings[j], pos_i + 1, Length(config_sl.Strings[j])); end; //Wert25 if (Pos(IntToStr(i) + '_HXPTT_Wert25=', config_sl.Strings[j]) = 1) then begin pos_i := Pos('=', config_sl.Strings[j]); g_button_cfg_ar[i].wert25_s := Copy(config_sl.Strings[j], pos_i + 1, Length(config_sl.Strings[j])); end; //Key3 if (Pos(IntToStr(i) + '_HXPTT_Root3=', config_sl.Strings[j]) = 1) then begin pos_i := Pos('=', config_sl.Strings[j]); g_button_cfg_ar[i].root3_s := Copy(config_sl.Strings[j], pos_i + 1, Length(config_sl.Strings[j])); end; //Path3 if (Pos(IntToStr(i) + '_HXPTT_Key3=', config_sl.Strings[j]) = 1) then begin pos_i := Pos('=', config_sl.Strings[j]); g_button_cfg_ar[i].key3_s := Copy(config_sl.Strings[j], pos_i + 1, Length(config_sl.Strings[j])); end; //Wert31 if (Pos(IntToStr(i) + '_HXPTT_Wert31=', config_sl.Strings[j]) = 1) then begin pos_i := Pos('=', config_sl.Strings[j]); g_button_cfg_ar[i].wert31_s := Copy(config_sl.Strings[j], pos_i + 1, Length(config_sl.Strings[j])); end; //Wert32 if (Pos(IntToStr(i) + '_HXPTT_Wert32=', config_sl.Strings[j]) = 1) then begin pos_i := Pos('=', config_sl.Strings[j]); g_button_cfg_ar[i].wert32_s := Copy(config_sl.Strings[j], pos_i + 1, Length(config_sl.Strings[j])); end; //Wert33 if (Pos(IntToStr(i) + '_HXPTT_Wert33=', config_sl.Strings[j]) = 1) then begin pos_i := Pos('=', config_sl.Strings[j]); g_button_cfg_ar[i].wert33_s := Copy(config_sl.Strings[j], pos_i + 1, Length(config_sl.Strings[j])); end; //Wert34 if (Pos(IntToStr(i) + '_HXPTT_Wert34=', config_sl.Strings[j]) = 1) then begin pos_i := Pos('=', config_sl.Strings[j]); g_button_cfg_ar[i].wert34_s := Copy(config_sl.Strings[j], pos_i + 1, Length(config_sl.Strings[j])); end; //Wert35 if (Pos(IntToStr(i) + '_HXPTT_Wert35=', config_sl.Strings[j]) = 1) then begin pos_i := Pos('=', config_sl.Strings[j]); g_button_cfg_ar[i].wert25_s := Copy(config_sl.Strings[j], pos_i + 1, Length(config_sl.Strings[j])); end; //Key4 if (Pos(IntToStr(i) + '_HXPTT_Root4=', config_sl.Strings[j]) = 1) then begin pos_i := Pos('=', config_sl.Strings[j]); g_button_cfg_ar[i].root4_s := Copy(config_sl.Strings[j], pos_i + 1, Length(config_sl.Strings[j])); end; //Path4 if (Pos(IntToStr(i) + '_HXPTT_Key4=', config_sl.Strings[j]) = 1) then begin pos_i := Pos('=', config_sl.Strings[j]); g_button_cfg_ar[i].key4_s := Copy(config_sl.Strings[j], pos_i + 1, Length(config_sl.Strings[j])); end; //Wert41 if (Pos(IntToStr(i) + '_HXPTT_Wert41=', config_sl.Strings[j]) = 1) then begin pos_i := Pos('=', config_sl.Strings[j]); g_button_cfg_ar[i].wert41_s := Copy(config_sl.Strings[j], pos_i + 1, Length(config_sl.Strings[j])); end; //Wert42 if (Pos(IntToStr(i) + '_HXPTT_Wert42=', config_sl.Strings[j]) = 1) then begin pos_i := Pos('=', config_sl.Strings[j]); g_button_cfg_ar[i].wert42_s := Copy(config_sl.Strings[j], pos_i + 1, Length(config_sl.Strings[j])); end; //Wert43 if (Pos(IntToStr(i) + '_HXPTT_Wert43=', config_sl.Strings[j]) = 1) then begin pos_i := Pos('=', config_sl.Strings[j]); g_button_cfg_ar[i].wert43_s := Copy(config_sl.Strings[j], pos_i + 1, Length(config_sl.Strings[j])); end; //Wert44 if (Pos(IntToStr(i) + '_HXPTT_Wert44=', config_sl.Strings[j]) = 1) then begin pos_i := Pos('=', config_sl.Strings[j]); g_button_cfg_ar[i].wert44_s := Copy(config_sl.Strings[j], pos_i + 1, Length(config_sl.Strings[j])); end; //Wert45 if (Pos(IntToStr(i) + '_HXPTT_Wert45=', config_sl.Strings[j]) = 1) then begin pos_i := Pos('=', config_sl.Strings[j]); g_button_cfg_ar[i].wert45_s := Copy(config_sl.Strings[j], pos_i + 1, Length(config_sl.Strings[j])); end; //Key5 if (Pos(IntToStr(i) + '_HXPTT_Root5=', config_sl.Strings[j]) = 1) then begin pos_i := Pos('=', config_sl.Strings[j]); g_button_cfg_ar[i].root5_s := Copy(config_sl.Strings[j], pos_i + 1, Length(config_sl.Strings[j])); end; //Path5 if (Pos(IntToStr(i) + '_HXPTT_Key5=', config_sl.Strings[j]) = 1) then begin pos_i := Pos('=', config_sl.Strings[j]); g_button_cfg_ar[i].key5_s := Copy(config_sl.Strings[j], pos_i + 1, Length(config_sl.Strings[j])); end; //Wert51 if (Pos(IntToStr(i) + '_HXPTT_Wert51=', config_sl.Strings[j]) = 1) then begin pos_i := Pos('=', config_sl.Strings[j]); g_button_cfg_ar[i].wert51_s := Copy(config_sl.Strings[j], pos_i + 1, Length(config_sl.Strings[j])); end; //Wert52 if (Pos(IntToStr(i) + '_HXPTT_Wert52=', config_sl.Strings[j]) = 1) then begin pos_i := Pos('=', config_sl.Strings[j]); g_button_cfg_ar[i].wert52_s := Copy(config_sl.Strings[j], pos_i + 1, Length(config_sl.Strings[j])); end; //Wert53 if (Pos(IntToStr(i) + '_HXPTT_Wert53=', config_sl.Strings[j]) = 1) then begin pos_i := Pos('=', config_sl.Strings[j]); g_button_cfg_ar[i].wert53_s := Copy(config_sl.Strings[j], pos_i + 1, Length(config_sl.Strings[j])); end; //Wert54 if (Pos(IntToStr(i) + '_HXPTT_Wert54=', config_sl.Strings[j]) = 1) then begin pos_i := Pos('=', config_sl.Strings[j]); g_button_cfg_ar[i].wert54_s := Copy(config_sl.Strings[j], pos_i + 1, Length(config_sl.Strings[j])); end; //Wert55 if (Pos(IntToStr(i) + '_HXPTT_Wert55=', config_sl.Strings[j]) = 1) then begin pos_i := Pos('=', config_sl.Strings[j]); g_button_cfg_ar[i].wert55_s := Copy(config_sl.Strings[j], pos_i + 1, Length(config_sl.Strings[j])); end; //Zusätzlicher Suchwert 1 if (Pos(IntToStr(i) + '_HXPTT_SuchWert1=', config_sl.Strings[j]) = 1) then begin pos_i := Pos('=', config_sl.Strings[j]); g_button_cfg_ar[i].suchwert1_s := Copy(config_sl.Strings[j], pos_i + 1, Length(config_sl.Strings[j])); end; //XP Default1 Werte if (Pos(IntToStr(i) + '_HXPTT_XP_Default1=', config_sl.Strings[j]) = 1) then begin pos_i := Pos('=', config_sl.Strings[j]); g_button_cfg_ar[i].xp_default1_s := Copy(config_sl.Strings[j], pos_i + 1, Length(config_sl.Strings[j])); end; //XP Default2 Werte if (Pos(IntToStr(i) + '_HXPTT_XP_Default2=', config_sl.Strings[j]) = 1) then begin pos_i := Pos('=', config_sl.Strings[j]); g_button_cfg_ar[i].xp_default2_s := Copy(config_sl.Strings[j], pos_i + 1, Length(config_sl.Strings[j])); end; //XP Default3 Werte if (Pos(IntToStr(i) + '_HXPTT_XP_Default3=', config_sl.Strings[j]) = 1) then begin pos_i := Pos('=', config_sl.Strings[j]); g_button_cfg_ar[i].xp_default3_s := Copy(config_sl.Strings[j], pos_i + 1, Length(config_sl.Strings[j])); end; //Homer Default1 Werte if (Pos(IntToStr(i) + '_HXPTT_Homer_Default1=', config_sl.Strings[j]) = 1) then begin pos_i := Pos('=', config_sl.Strings[j]); g_button_cfg_ar[i].homer_default1_s := Copy(config_sl.Strings[j], pos_i + 1, Length(config_sl.Strings[j])); end; //Homer Default2 Werte if (Pos(IntToStr(i) + '_HXPTT_Homer_Default2=', config_sl.Strings[j]) = 1) then begin pos_i := Pos('=', config_sl.Strings[j]); g_button_cfg_ar[i].homer_default2_s := Copy(config_sl.Strings[j], pos_i + 1, Length(config_sl.Strings[j])); end; //Homer Default3 Werte if (Pos(IntToStr(i) + '_HXPTT_Homer_Default3=', config_sl.Strings[j]) = 1) then begin pos_i := Pos('=', config_sl.Strings[j]); g_button_cfg_ar[i].homer_default3_s := Copy(config_sl.Strings[j], pos_i + 1, Length(config_sl.Strings[j])); end; //XP Soll Wert if (Pos(IntToStr(i) + '_HXPTT_XP_Soll=', config_sl.Strings[j]) = 1) then begin pos_i := Pos('=', config_sl.Strings[j]); g_button_cfg_ar[i].xp_soll_s := Copy(config_sl.Strings[j], pos_i + 1, Length(config_sl.Strings[j])); end; //Homer Soll Wert if (Pos(IntToStr(i) + '_HXPTT_Homer_Soll=', config_sl.Strings[j]) = 1) then begin pos_i := Pos('=', config_sl.Strings[j]); g_button_cfg_ar[i].homer_soll_s := Copy(config_sl.Strings[j], pos_i + 1, Length(config_sl.Strings[j])); end; //Element 1 if (Pos(IntToStr(i) + '_HXPTT_Element1=', config_sl.Strings[j]) = 1) then begin pos_i := Pos('=', config_sl.Strings[j]); g_button_cfg_ar[i].element1_s := Copy(config_sl.Strings[j], pos_i + 1, Length(config_sl.Strings[j])); end; //Element 2 if (Pos(IntToStr(i) + '_HXPTT_Element2=', config_sl.Strings[j]) = 1) then begin pos_i := Pos('=', config_sl.Strings[j]); g_button_cfg_ar[i].element2_s := Copy(config_sl.Strings[j], pos_i + 1, Length(config_sl.Strings[j])); end; //Element 3 if (Pos(IntToStr(i) + '_HXPTT_Element3=', config_sl.Strings[j]) = 1) then begin pos_i := Pos('=', config_sl.Strings[j]); g_button_cfg_ar[i].element3_s := Copy(config_sl.Strings[j], pos_i + 1, Length(config_sl.Strings[j])); end; //Element 4 if (Pos(IntToStr(i) + '_HXPTT_Element4=', config_sl.Strings[j]) = 1) then begin pos_i := Pos('=', config_sl.Strings[j]); g_button_cfg_ar[i].element4_s := Copy(config_sl.Strings[j], pos_i + 1, Length(config_sl.Strings[j])); end; //Element 5 if (Pos(IntToStr(i) + '_HXPTT_Element5=', config_sl.Strings[j]) = 1) then begin pos_i := Pos('=', config_sl.Strings[j]); g_button_cfg_ar[i].element5_s := Copy(config_sl.Strings[j], pos_i + 1, Length(config_sl.Strings[j])); end; //Element 6 if (Pos(IntToStr(i) + '_HXPTT_Element6=', config_sl.Strings[j]) = 1) then begin pos_i := Pos('=', config_sl.Strings[j]); g_button_cfg_ar[i].element6_s := Copy(config_sl.Strings[j], pos_i + 1, Length(config_sl.Strings[j])); end; //Element 7 if (Pos(IntToStr(i) + '_HXPTT_Element7=', config_sl.Strings[j]) = 1) then begin pos_i := Pos('=', config_sl.Strings[j]); g_button_cfg_ar[i].element7_s := Copy(config_sl.Strings[j], pos_i + 1, Length(config_sl.Strings[j])); end; //Element 8 if (Pos(IntToStr(i) + '_HXPTT_Element8=', config_sl.Strings[j]) = 1) then begin pos_i := Pos('=', config_sl.Strings[j]); g_button_cfg_ar[i].element8_s := Copy(config_sl.Strings[j], pos_i + 1, Length(config_sl.Strings[j])); end; //Element 9 if (Pos(IntToStr(i) + '_HXPTT_Element9=', config_sl.Strings[j]) = 1) then begin pos_i := Pos('=', config_sl.Strings[j]); g_button_cfg_ar[i].element9_s := Copy(config_sl.Strings[j], pos_i + 1, Length(config_sl.Strings[j])); end; //Element 10 if (Pos(IntToStr(i) + '_HXPTT_Element10=', config_sl.Strings[j]) = 1) then begin pos_i := Pos('=', config_sl.Strings[j]); g_button_cfg_ar[i].element10_s := Copy(config_sl.Strings[j], pos_i + 1, Length(config_sl.Strings[j])); end; //Element 11 if (Pos(IntToStr(i) + '_HXPTT_Element11=', config_sl.Strings[j]) = 1) then begin pos_i := Pos('=', config_sl.Strings[j]); g_button_cfg_ar[i].element11_s := Copy(config_sl.Strings[j], pos_i + 1, Length(config_sl.Strings[j])); end; //Element 12 if (Pos(IntToStr(i) + '_HXPTT_Element12=', config_sl.Strings[j]) = 1) then begin pos_i := Pos('=', config_sl.Strings[j]); g_button_cfg_ar[i].element12_s := Copy(config_sl.Strings[j], pos_i + 1, Length(config_sl.Strings[j])); end; //Element Hint 1 if (Pos(IntToStr(i) + '_HXPTT_Element_Hint1=', config_sl.Strings[j]) = 1) then begin pos_i := Pos('=', config_sl.Strings[j]); g_button_cfg_ar[i].element_hint1_s := Copy(config_sl.Strings[j], pos_i + 1, Length(config_sl.Strings[j])); end; //Element Hint2 if (Pos(IntToStr(i) + '_HXPTT_Element_Hint2=', config_sl.Strings[j]) = 1) then begin pos_i := Pos('=', config_sl.Strings[j]); g_button_cfg_ar[i].element_hint2_s := Copy(config_sl.Strings[j], pos_i + 1, Length(config_sl.Strings[j])); end; end; end; //ProgressBar ProgressBar_Starten_GU('I8', 'I9', 'PB_Config', 0, k_max_xp_tweak_i, i); end; finally config_sl.Free; res_s.Free; end; end; //Dll freigeben FreeLibrary(lib_h); end; ps ich weiß ich hätte auch eine datenbank nehmen können wollte ich aber nicht |
Zitat |
Registriert seit: 10. Jun 2002 Ort: Unterhaching 11.412 Beiträge Delphi 12 Athens |
#9
Erste enorme Verbesserung sollte es sein, wenn Du config_sl.Strings[j] in eine "Dummy Variable" lädst und anschließend mit der arbeitest. Wie lange dauert es dann noch?
......
Daniel Lizbeth
Ich bin nicht zurück, ich tue nur so |
Zitat |
Ansicht |
Linear-Darstellung |
Zur Hybrid-Darstellung wechseln |
Zur Baum-Darstellung wechseln |
ForumregelnEs ist dir nicht erlaubt, neue Themen zu verfassen.
Es ist dir nicht erlaubt, auf Beiträge zu antworten.
Es ist dir nicht erlaubt, Anhänge hochzuladen.
Es ist dir nicht erlaubt, deine Beiträge zu bearbeiten.
BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus. Trackbacks are an
Pingbacks are an
Refbacks are aus
|
|
Nützliche Links |
Heutige Beiträge |
Sitemap |
Suchen |
Code-Library |
Wer ist online |
Alle Foren als gelesen markieren |
Gehe zu... |
LinkBack |
LinkBack URL |
About LinkBacks |