Login | Register
My pages Projects Community openCollabNet

Discussions > dev > RE: Re: Patch - unnecessary actions

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

tortoisesvn
Discussion topic

Back to topic list

RE: Re: Patch - unnecessary actions

Author klimax
Full name Daniel Klima
Date 2011-08-08 00:25:58 PDT
Message > On 2011-08-04 18:44, Stefan Küng wrote:
> >
> >> Side question how good is VS to use merged strings? From my expirence
> >> using single object (CString) save some conversions and space. This is
> >> minor trought.
> > Can you explain in more detail what you want to do?
> You have many line containing something like:
> String += '\t';
>
> In some languages and compilers there is not direct String + char*
> this make string object creation for '\t' every time you use it. It may
> be marginaly improvement to use String + String. However I use VC only
> for TSVN.
>
> > Stefan
> >

As far as I can tell from source code of MFC*, it allocates new buffer and copies char(s) there.

So no conversion.

*I think MFC is used...

Note:There are several layers of templates and typedefs, but it is down to calling AppendChar:
==
void AppendChar(_In_ XCHAR ch)
    {
        UINT nOldLength = GetLength();
        int nNewLength = nOldLength+1;
        PXSTR pszBuffer = GetBuffer( nNewLength );
        pszBuffer[nOldLength] = ch;
        ReleaseBufferSetLength( nNewLength );
    }
==

Klimax

« Previous message in topic | 6 of 6 | Next message in topic »

Messages

Show all messages in topic

Patch - unnecessary actions wipedout Dmitry 2011-08-02 23:05:35 PDT
     Re: Patch - unnecessary actions otik Oto BREZINA 2011-08-03 15:26:48 PDT
         Re: Patch - unnecessary actions steveking Stefan Küng 2011-08-04 09:45:27 PDT
             Re: Patch - unnecessary actions otik Oto BREZINA 2011-08-07 13:23:19 PDT
                 Re: Patch - unnecessary actions steveking Stefan Küng 2011-08-07 13:25:27 PDT
                 RE: Re: Patch - unnecessary actions klimax Daniel Klima 2011-08-08 00:25:58 PDT
Messages per page: