View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0006274 | JEDI VCL | 00 JVCL Components | public | 2014-04-11 13:28 | 2014-04-20 19:12 |
Reporter | bhe | Assigned To | jfudickar | ||
Priority | normal | Severity | tweak | Reproducibility | always |
Status | resolved | Resolution | fixed | ||
Product Version | 3.47 | ||||
Target Version | Fixed in Version | ||||
Summary | 0006274: Improvement suggest: Faster TJvCustomAppIniStorage | ||||
Description | TJvCustomAppIniStorage already contains a tweak which addresses the same tweak, but only for Delphi 2007 and only partly (see TJvMemIniFile in JvAppIniStorage.pas). I've added a more generic class helper with an additional improvement. See attached file. Please migrate this in any way you want. | ||||
Additional Information | Added code: {$IFDEF DELPHI8_UP} type /// Optimization: TMemIniFile should overwrite this methods by itself TMemIniFileHelper = class helper for TMemIniFile public function SectionExists(const Section: string): Boolean; function ValueExists(const Section, Ident: string): Boolean; end; function TMemIniFileHelper.SectionExists(const Section: string): Boolean; begin Result := self.FSections.IndexOf(Section) >= 0; end; function TMemIniFileHelper.ValueExists(const Section, Ident: string): Boolean; var I: Integer; Strings: TStrings; begin I := self.FSections.IndexOf(Section); if I >= 0 then begin Strings := TStringList(self.FSections.Objects[I]); I := Strings.IndexOfName(Ident); Result := I >= 0; end else Result := False; end; {$ENDIF DELPHI8_UP} | ||||
Tags | No tags attached. | ||||
2014-04-11 13:28
|
JvAppIniStorage.pas (28,051 bytes) |
|
Did you have a small sample which helps me to test the improvement? |
2014-04-17 11:44
|
AppIniFileStorageTest.zip (1,421,164 bytes) |
|
Attached sample takes 8100ms on my system with original implementation and just 191ms with my little helper. |
|
Thanks for this improvement. Added to the repository |
Date Modified | Username | Field | Change |
---|---|---|---|
2014-04-11 13:28 | bhe | New Issue | |
2014-04-11 13:28 | bhe | File Added: JvAppIniStorage.pas | |
2014-04-16 18:31 | jfudickar | Note Added: 0020948 | |
2014-04-16 18:31 | jfudickar | Status | new => feedback |
2014-04-17 11:44 | bhe | File Added: AppIniFileStorageTest.zip | |
2014-04-17 11:44 | bhe | Note Added: 0020949 | |
2014-04-20 19:12 | jfudickar | Note Added: 0020950 | |
2014-04-20 19:12 | jfudickar | Status | feedback => resolved |
2014-04-20 19:12 | jfudickar | Resolution | open => fixed |
2014-04-20 19:12 | jfudickar | Assigned To | => jfudickar |