Click here to Skip to main content
15,896,329 members
Home / Discussions / C#
   

C#

 
AnswerRe: [Wp8.1] How to save the RenderTargetBitmap to png? Pin
BobJanova16-Jun-14 0:34
BobJanova16-Jun-14 0:34 
GeneralRe: [Wp8.1] How to save the RenderTargetBitmap to png? Pin
Lãng Khách16-Jun-14 1:17
Lãng Khách16-Jun-14 1:17 
Questionc# - duplicate tabpage Pin
Member 1026763014-Jun-14 22:46
Member 1026763014-Jun-14 22:46 
AnswerRe: c# - duplicate tabpage Pin
OriginalGriff14-Jun-14 23:40
mveOriginalGriff14-Jun-14 23:40 
Questioni set combobox data source value and cleare item also but just add a new item combo list is add new list in old list my code is Pin
Member 1066930114-Jun-14 21:11
Member 1066930114-Jun-14 21:11 
AnswerRe: i set combobox data source value and cleare item also but just add a new item combo list is add new list in old list my code is Pin
OriginalGriff14-Jun-14 21:51
mveOriginalGriff14-Jun-14 21:51 
GeneralRe: i set combobox data source value and cleare item also but just add a new item combo list is add new list in old list my code is Pin
Member 1066930114-Jun-14 23:08
Member 1066930114-Jun-14 23:08 
GeneralRe: i set combobox data source value and cleare item also but just add a new item combo list is add new list in old list my code is Pin
OriginalGriff14-Jun-14 23:39
mveOriginalGriff14-Jun-14 23:39 
GeneralRe: Not Refresh combo box item list Or Just say Not clear itemlist Pin
Member 1066930115-Jun-14 0:17
Member 1066930115-Jun-14 0:17 
GeneralRe: Not Refresh combo box item list Or Just say Not clear itemlist PinPopular
Mycroft Holmes15-Jun-14 0:22
professionalMycroft Holmes15-Jun-14 0:22 
GeneralRe: Not Refresh combo box item list Or Just say Not clear itemlist Pin
Member 1066930115-Jun-14 1:00
Member 1066930115-Jun-14 1:00 
GeneralRe: Not Refresh combo box item list Or Just say Not clear itemlist Pin
OriginalGriff15-Jun-14 1:07
mveOriginalGriff15-Jun-14 1:07 
GeneralRe: Not Refresh combo box item list Or Just say Not clear itemlist Pin
Mycroft Holmes15-Jun-14 14:02
professionalMycroft Holmes15-Jun-14 14:02 
AnswerRe: i set combobox data source value and cleare item also but just add a new item combo list is add new list in old list my code is Pin
AshishvermaMCA15-Jun-14 20:25
AshishvermaMCA15-Jun-14 20:25 
Question[C #] Doubt How to make a chat list using Network API Pin
Member 916415114-Jun-14 13:00
Member 916415114-Jun-14 13:00 
AnswerRe: [C #] Doubt How to make a chat list using Network API Pin
Wes Aday14-Jun-14 13:30
professionalWes Aday14-Jun-14 13:30 
QuestionMemory performance and foreach vs for Pin
Super Lloyd14-Jun-14 6:57
Super Lloyd14-Jun-14 6:57 
AnswerRe: Memory performance and foreach vs for Pin
Kornfeld Eliyahu Peter14-Jun-14 9:26
professionalKornfeld Eliyahu Peter14-Jun-14 9:26 
GeneralRe: Memory performance and foreach vs for Pin
harold aptroot14-Jun-14 9:33
harold aptroot14-Jun-14 9:33 
GeneralRe: Memory performance and foreach vs for Pin
Kornfeld Eliyahu Peter14-Jun-14 10:21
professionalKornfeld Eliyahu Peter14-Jun-14 10:21 
GeneralRe: Memory performance and foreach vs for Pin
PIEBALDconsult14-Jun-14 18:46
mvePIEBALDconsult14-Jun-14 18:46 
GeneralRe: Memory performance and foreach vs for Pin
Super Lloyd14-Jun-14 19:49
Super Lloyd14-Jun-14 19:49 
I am not too worried..

But I am writing custom Panel (for WPF) which will be in hierarchical resizable items controls...
And they will do multi pass layout too...
Hence I am going to do a lot of recursive call on every mouse move events...

So far it's very quick and I am not really worried!
However I can't help to see how, in the .NET source code, they use struct as much as possible in such case and even use an internal BooleanBoxes to optimize boxing away for DependencyProperty(ies)...

And I though if I could reduce boxing and memory allocation in my panels, that would be nice too!
And I noticed the foreach => GetEnumerator() and was wondering about it!

It's not micro optimization, as this is a process on its own which has no link with anything else. But it will be a process that will be called regularly, why not spend 1 more hour to make it better?

At any rate.. I am using for loop now and only struct in my layout code and I reuse the same array, when I need one!
So memory wise it's good enough! Smile | :)
My programming get away... The Blog...
DirectX for WinRT/C# since 2013!
Taking over the world since 1371!

GeneralRe: Memory performance and foreach vs for Pin
PIEBALDconsult15-Jun-14 4:32
mvePIEBALDconsult15-Jun-14 4:32 
GeneralRe: Memory performance and foreach vs for Pin
Super Lloyd15-Jun-14 5:07
Super Lloyd15-Jun-14 5:07 
AnswerRe: Memory performance and foreach vs for Pin
V.15-Jun-14 21:07
professionalV.15-Jun-14 21:07 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.