• Do not register here on develop.twiki.org, login with your twiki.org account.
• Use View topic Item7848 for generic doc work for TWiki-6.1.1. Use View topic Item7851 for doc work on extensions that are not part of a release. More... Close
• Anything you create or change in standard webs (Main, TWiki, Sandbox etc) will be automatically reverted on every SVN update.
Does this site look broken?. Use the LitterTray web for test cases.

Item5121: Performance: Copy hash

Item Form Data

AppliesTo: Component: Priority: CurrentState: WaitingFor: TargetRelease ReleasedIn
Engine   Normal Closed   minor  

Edit Form Data

Summary:
Reported By:
Codebase:
Applies To:
Component:
Priority:
Current State:
Waiting For:
Target Release:
Released In:
 

Detail

I got this feedbakc via e-mail from Klaus Ethgen:

QUOTE

I found a little performance issue. You use sometimes sort to
copy one hash to another. For example line 493ff in TWiki/UI/Manage.pm:

        foreach my $ref (sort keys %$refs0) {
            $refs{$ref} = $refs0->{$ref};
        }
        foreach my $ref (sort keys %$refs1) {
            $refs{$ref} = $refs1->{$ref};
        }

This makes absolutely no sense as the sort order is irrelevant in both,
the target and the destination. So this only kills performance. A better
solution would be:

   %refs = (%$refs0, %$refs1);

/QUOTE

-- TWiki:Main/PeterThoeny - 12 Dec 2007

Perhaps a hangover from a time when that loop did an order-dependent operation. As far as I can see there is only one instance of this pattern in the code.

Changed in MAIN only (for Georgetown/next patch)

-- TWiki:Main.CrawfordCurrie - 13 Dec 2007

see Item5554 for merge to 4.2.x branch

-- TWiki:Main.SvenDowideit - 22 Apr 2008

ItemTemplate
Summary Performance: Copy hash
ReportedBy TWiki:Main.PeterThoeny
Codebase 4.2.0, ~twiki4
SVN Range TWiki-4.3.0, Sun, 25 Nov 2007, build 15790
AppliesTo Engine
Component

Priority Normal
CurrentState Closed
WaitingFor

Checkins TWikirev:15986 TWikirev:15987
TargetRelease minor
ReleasedIn

Edit | Attach | Watch | Print version | History: r6 < r5 < r4 < r3 < r2 | Backlinks | Raw View |  Raw edit | More topic actions
Topic revision: r6 - 2008-04-22 - SvenDowideit
 
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2024 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback