View Issue Details

IDProjectCategoryView StatusLast Update
0030869FPCRTLpublic2016-11-07 15:33
ReporterAlexey Tor.Assigned ToMichael Van Canneyt 
PrioritynormalSeverityminorReproducibilityhave not tried
Status resolvedResolutionfixed 
Product Version3.0.0Product Build 
Target Version3.2.0Fixed in Version3.1.1 
Summary0030869: StringList: make method CheckIndex
DescriptionSuch check is used 6-7 times in stringlist. Pls make method, e.g. CheckIndex(N: integer)
(it raises Error if not ok)

  If (Index1<0) or (Index1>=FCount) then
    Error(SListIndexError,Index1);
TagsNo tags attached.
Fixed in Revision34817
FPCOldBugId
FPCTarget
Attached Files

Activities

jamie philbrook

2016-11-06 02:05

reporter   ~0095605

I guess you haven't considered the extra CPU time it'll take for the
call stack on top of which, the initial setup for each call will most likely
translate into the same amount of code if not more, with the added CPU time
for the call on top of that.

   6..7 times in that class is just fine for. It's not like it gets duplicated
 * "Number of instances"

 That's just my opinion. We really don't need to find ways to slow the code
down even more that does not offer any significant improvement or even take a
step back.

Alexey Tor.

2016-11-06 15:43

reporter   ~0095607

jamie,
we have in FPC directive which makes call simple. "inline". it makes no additional CPU time on calling the func. it makes func inline so no CPU time on call?

Michael Van Canneyt

2016-11-06 18:05

administrator   ~0095609

As pointed out, when using inline, the impact on performance should be zero.

Alexey Tor.

2016-11-06 20:16

reporter   ~0095616

This place fix too pls
procedure TStringList.InsertItem(Index: Integer; const S: string; O: TObject);
begin
  Changing;
  If FCount=Fcapacity then Grow;
  If Index<FCount then

Michael Van Canneyt

2016-11-07 12:35

administrator   ~0095627

Can you please enter separate bugs for TFPList and TFPSList ?
These are separate issues.

Alexey Tor.

2016-11-07 14:53

reporter   ~0095632

okay.

Michael Van Canneyt

2016-11-07 15:33

administrator   ~0095634

Thanks. I will assign them to me.

Issue History

Date Modified Username Field Change
2016-11-04 20:09 Alexey Tor. New Issue
2016-11-04 20:52 Michael Van Canneyt Assigned To => Michael Van Canneyt
2016-11-04 20:52 Michael Van Canneyt Status new => assigned
2016-11-06 02:05 jamie philbrook Note Added: 0095605
2016-11-06 15:43 Alexey Tor. Note Added: 0095607
2016-11-06 18:05 Michael Van Canneyt Fixed in Revision => 34817
2016-11-06 18:05 Michael Van Canneyt Note Added: 0095609
2016-11-06 18:05 Michael Van Canneyt Status assigned => resolved
2016-11-06 18:05 Michael Van Canneyt Fixed in Version => 3.1.1
2016-11-06 18:05 Michael Van Canneyt Resolution open => fixed
2016-11-06 18:05 Michael Van Canneyt Target Version => 3.2.0
2016-11-06 20:16 Alexey Tor. Note Added: 0095616
2016-11-06 20:16 Alexey Tor. Status resolved => feedback
2016-11-06 20:16 Alexey Tor. Resolution fixed => reopened
2016-11-06 20:21 Alexey Tor. Status feedback => assigned
2016-11-07 12:35 Michael Van Canneyt Note Added: 0095627
2016-11-07 14:53 Alexey Tor. Note Added: 0095632
2016-11-07 15:33 Michael Van Canneyt Note Added: 0095634
2016-11-07 15:33 Michael Van Canneyt Status assigned => resolved
2016-11-07 15:33 Michael Van Canneyt Resolution reopened => fixed