Featured post

c# - Usage of Server Side Controls in MVC Frame work -

i using asp.net 4.0 , mvc 2.0 web application. project requiremrnt have use server side control in application not possibl in noraml case. ideally want use adrotator control , datalist control. i saw few samples , references in codepleax mvc controllib howwver found less useful. can tell how utilize theese controls in asp.net application along mvc. note: please provide functionalities related adrotator , datalist controls not equivalent functionalities thanks in advace. mvc pages not use normal .net solution makes use of normal .net components impossible. a normal .net page use event driven solution call different methods service side mvc use actions , view completly different way handle things. also, mvc not use viewstate normal .net controlls require. found article discussing mixing of normal .net , mvc.

java - Is it worth pooling byte[] and char[] arrays or is it beter to just create -


my code lot of input/output , involves creation of temporary arrays hold bytes or chars of size - use 4096. im starting wonder - without actual tests - verify if better pool these arrays. code change this

take array pool try {    read 1 inputstream    write outputstream using array } {    return array pool } 
  • it quicker take or create byte 4096 means work required alloc mem on heap, clear 4096 bytes etc.
  • a pool seems simpler after checking list taking list , returning array.

update wrote small program did 2 things, created arrays , used apache commons pool. both looped lot of times (100*100*100) , created/took, filled array, released. added few goes in beginning warm jit , ignored results of those. each run ran create , pool forms dozen times, alternating between two.

there little difference between pool , create forms. if added clear array callback fired apache commons pool when instance returned pool, pool became slower thanthe created form.

i not implement pooling until performance problem demonstrated.


Comments

Popular posts from this blog

c# - Usage of Server Side Controls in MVC Frame work -

cocoa - Nesting arrays into NSDictionary object (Objective-C) -

ios - Very simple iPhone App crashes on UILabel settext -