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 - Why does my performance increase when touching the screen? -


for reason fps jumps considerably when move mouse around on screen (on emulator) while holding left mouse button. game laggy, if touch screen (and long moving mouse around while touching) goes smooth.

i have tried sleeping 20ms in ontouchevent, doesn't appear make difference.

here code use in ontouchevent:

 // events when touching screen     public boolean ontouchevent(motionevent event)      {         int eventaction = event.getaction();           touchx=event.getx();         touchy=event.gety();          switch (eventaction)          {           case motionevent.action_down:           {           touch=true;          }          break;            case motionevent.action_move:          {           }          break;            case motionevent.action_up:            {           touch=false;          }               break;          }       /*try       {       ascentthread.sleep(20);      }       catch (interruptedexception e)       {       // todo auto-generated catch block       e.printstacktrace();      }*/          return true;      } 

in logcat log, fps current fps (average of last 20 frames), touch whether or not screen being touched (from ontouchevent).

what on earth going on? has else had odd behaviour before?

logcat log:

12-21 19:43:26.154: info/myactivity(786): fps: 31.686569159606414 touch: false 12-21 19:43:27.624: info/myactivity(786): fps: 19.46310293212206 touch: false 12-21 19:43:29.104: info/myactivity(786): fps: 18.801202175690467 touch: false 12-21 19:43:30.514: info/myactivity(786): fps: 21.118295877408478 touch: false 12-21 19:43:31.985: info/myactivity(786): fps: 19.117397812958878 touch: false 12-21 19:43:33.534: info/myactivity(786): fps: 15.572571858239263 touch: false 12-21 19:43:34.934: info/myactivity(786): fps: 20.584119901503506 touch: false 12-21 19:43:36.404: info/myactivity(786): fps: 18.888025905454207 touch: false 12-21 19:43:37.814: info/myactivity(786): fps: 22.35722329083629 touch: false 12-21 19:43:39.353: info/myactivity(786): fps: 15.73604859775362 touch: false 12-21 19:43:40.763: info/myactivity(786): fps: 20.912449882754633 touch: false 12-21 19:43:42.233: info/myactivity(786): fps: 18.785278388997718 touch: false 12-21 19:43:43.634: info/myactivity(786): fps: 20.1357397209596 touch: false 12-21 19:43:45.043: info/myactivity(786): fps: 21.961138432007957 touch: false 12-21 19:43:46.453: info/myactivity(786): fps: 22.167196852834273 touch: false 12-21 19:43:47.854: info/myactivity(786): fps: 22.207318228024274 touch: false 12-21 19:43:49.264: info/myactivity(786): fps: 22.36980559230175 touch: false 12-21 19:43:50.604: info/myactivity(786): fps: 23.587638823252547 touch: false 12-21 19:43:52.073: info/myactivity(786): fps: 19.233902040593076 touch: false 12-21 19:43:53.624: info/myactivity(786): fps: 15.542190150440987 touch: false 12-21 19:43:55.034: info/myactivity(786): fps: 20.82290063974675 touch: false 12-21 19:43:56.436: info/myactivity(786): fps: 21.975282007207717 touch: false 12-21 19:43:57.914: info/myactivity(786): fps: 18.786927284103687 touch: false 12-21 19:43:59.393: info/myactivity(786): fps: 18.96879004217992 touch: false 12-21 19:44:00.625: info/myactivity(786): fps: 28.367566618064878 touch: false 12-21 19:44:02.113: info/myactivity(786): fps: 19.04441528684418 touch: false 12-21 19:44:03.585: info/myactivity(786): fps: 18.807837511809065 touch: false 12-21 19:44:04.993: info/myactivity(786): fps: 21.134330284993418 touch: false 12-21 19:44:06.275: info/myactivity(786): fps: 27.209688764079907 touch: false 12-21 19:44:07.753: info/myactivity(786): fps: 19.055894653261653 touch: false 12-21 19:44:09.163: info/myactivity(786): fps: 22.05422794901088 touch: false 12-21 19:44:10.644: info/myactivity(786): fps: 18.6956805300596 touch: false 12-21 19:44:12.124: info/myactivity(786): fps: 17.434180581311054 touch: false 12-21 19:44:13.594: info/myactivity(786): fps: 18.71932038510891 touch: false 12-21 19:44:14.504: info/myactivity(786): fps: 40.94571503868066 touch: true 12-21 19:44:14.924: info/myactivity(786): fps: 57.061200121138576 touch: true 12-21 19:44:15.364: info/myactivity(786): fps: 62.54377946377936 touch: true 12-21 19:44:15.764: info/myactivity(786): fps: 64.05005071818726 touch: true 12-21 19:44:16.384: info/myactivity(786): fps: 50.912951172948155 touch: true 12-21 19:44:16.874: info/myactivity(786): fps: 55.31242053078078 touch: true 12-21 19:44:17.364: info/myactivity(786): fps: 59.31625410615102 touch: true 12-21 19:44:18.413: info/myactivity(786): fps: 36.63504170925923 touch: false 12-21 19:44:19.885: info/myactivity(786): fps: 18.099130467755923 touch: false 12-21 19:44:21.363: info/myactivity(786): fps: 18.458978222946566 touch: false 12-21 19:44:22.683: info/myactivity(786): fps: 25.582179409330823 touch: true 12-21 19:44:23.044: info/myactivity(786): fps: 60.99865521942455 touch: true 12-21 19:44:23.403: info/myactivity(786): fps: 74.17873975470984 touch: true 12-21 19:44:23.763: info/myactivity(786): fps: 64.25663040460714 touch: true 12-21 19:44:24.113: info/myactivity(786): fps: 62.47483457826921 touch: true 12-21 19:44:24.473: info/myactivity(786): fps: 65.27969529547072 touch: true 12-21 19:44:24.825: info/myactivity(786): fps: 67.84743115273311 touch: true 12-21 19:44:25.173: info/myactivity(786): fps: 73.50854551357706 touch: true 12-21 19:44:25.523: info/myactivity(786): fps: 70.46432534585368 touch: true 12-21 19:44:25.873: info/myactivity(786): fps: 69.04076953445896 touch: true 

if you're running emulator on windows, think this explains it:

description of performance options in windows

... also, remember microsoft windows nt uses additional priority adjustments (usually 2) based on other events, such momentarily boosting thread's priority when returns i/o call, when returning user-mode subsystem call, or when receiving keyboard input.

i've seen effect many times. , took peek @ emulator using processexplorer: while can't sure, looks emulator runs under single windows thread. unless you're seeing similar performance boost on real android device, i'd assume it's effect of windows os, not androidos.


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 -