Login | Register
My pages Projects Community openCollabNet

Discussions > dev > Re: [T-Merge patch] syncing code for views

Project highlights: :. Download .: :. Support .: :. FAQ .: :. Translations .: :. Donate .: :. Report Bug .:

tortoisesvn
Discussion topic

Back to topic list

Re: [T-Merge patch] syncing code for views

Author otik
Full name Oto BREZINA
Date 2011-04-09 12:54:25 PDT
Message On 2011-04-06 18:25, Stefan Küng wrote:
> On 05.04.2011 23:09, Oto BREZINA wrote:
>>
>>>> popup.AppendMenu(
>>>> UINT nFlags,
>>>> UINT_PTR nIDNewItem = 0,
>>>> LPCTSTR lpszNewItem = NULL )
>>>>
>>>> 1. Is there any real gain to do not use nIDNewItem same value as IDS ?
>>> That depends on whether we trust the optimizations of the compiler :)
>>> If we use the IDS values, then the switch() could take up a lot of space
>>> since those values are not continuous or even in the same value range.
>>> Sure, we could edit the resource.h file manually to make sure those IDS
>>> values are as we would like them, but I don't like messing with
>>> generated files.
>> we are talking about user action response - called rare, with up to ten
>> values. No big deal, but I will keep in mind ...
> It's not a performance issue but a code size issue. The switch-case
> statement is converted into a jump table, and if the values are far
> apart, that jump table gets really big. And we have to trust the
> optimizer to decide in such cases that a jump table isn't the right
> thing to do but better convert the switch-case to if-else statements.
I would say numbers are from big range right now:
ID_EDIT_COPY and ID_EDIT_PASTE are 0xE122 and 0xE125 respectively.
http://msdn.microsof​t.com/en-us/library/​dd941781%28v=vs.85%2​9.aspx - may
be not a relevant source I have seen lot of other values, but this one
is MSDN.

But I'm looking for other solution..
> Stefan
>

--
Oto BREZINA, Printflow s.r.o., EU

« Previous message in topic | 5 of 27 | Next message in topic »

Messages

Show all messages in topic

[T-Merge patch] syncing code for views otik Oto BREZINA 2011-04-04 13:57:21 PDT
     Re: [T-Merge patch] syncing code for views steveking Stefan Küng 2011-04-05 11:03:39 PDT
         Re: [T-Merge patch] syncing code for views otik Oto BREZINA 2011-04-05 14:10:14 PDT
             Re: [T-Merge patch] syncing code for views steveking Stefan Küng 2011-04-06 09:26:00 PDT
                 Re: [T-Merge patch] syncing code for views otik Oto BREZINA 2011-04-09 12:54:25 PDT
             Re: [T-Merge patch] syncing code for views otik Oto BREZINA 2011-04-06 15:12:10 PDT
                 Re: [T-Merge patch] syncing code for views steveking Stefan Küng 2011-04-07 10:16:41 PDT
                     Re: [T-Merge patch] syncing code for views otik Oto BREZINA 2011-04-07 12:03:24 PDT
                         Re: [T-Merge patch] syncing code for views steveking Stefan Küng 2011-04-07 12:42:35 PDT
                             Re: [T-Merge patch] syncing code for views otik Oto BREZINA 2011-04-07 13:20:49 PDT
                                 Re: [T-Merge patch] syncing code for views steveking Stefan Küng 2011-04-07 13:30:40 PDT
                                     Re: [T-Merge patch] syncing code for views otik Oto BREZINA 2011-04-07 15:23:20 PDT
                                         Re: [T-Merge patch] syncing code for views steveking Stefan Küng 2011-04-08 12:01:02 PDT
                                             Re: [T-Merge patch] syncing code for views otik Oto BREZINA 2011-04-08 13:10:05 PDT
                                                 Re: [T-Merge patch] syncing code for views steveking Stefan Küng 2011-04-09 00:17:09 PDT
                                                     Re: [T-Merge patch] syncing code for views otik Oto BREZINA 2011-04-09 06:50:02 PDT
         Re: [T-Merge patch] syncing code for views otik Oto BREZINA 2011-04-17 00:31:07 PDT
             Re: [T-Merge patch] syncing code for views steveking Stefan Küng 2011-04-17 02:46:45 PDT
                 Re: [T-Merge patch] syncing code for views otik Oto BREZINA 2011-05-11 13:54:50 PDT
                     Re: [T-Merge patch] syncing code for views steveking Stefan Küng 2011-05-12 12:52:58 PDT
     Re: [T-Merge patch] syncing code for views steveking Stefan Küng 2011-04-10 02:14:27 PDT
     Re: [T-Merge patch] syncing code for views steveking Stefan Küng 2011-04-10 02:15:30 PDT
         Re: [T-Merge patch] syncing code for views otik Oto BREZINA 2011-04-10 12:08:55 PDT
             Re: [T-Merge patch] syncing code for views steveking Stefan Küng 2011-04-10 12:14:39 PDT
                 Re: [T-Merge patch] syncing code for views otik Oto BREZINA 2011-04-10 12:22:04 PDT
Page: of 2 « Previous | Next »
Messages per page: