JohnMarzulli / StratuxHud

Heads Up Display for use with Stratux. Designed for reflective HUD screens, intended for traffic call outs.
https://johnmarzulli.github.io/StratuxHud/
GNU Lesser General Public License v3.0
124 stars 22 forks source link

Python 3.5 Performance Is 12FPS #37

Closed JohnMarzulli closed 5 years ago

JohnMarzulli commented 5 years ago

Performance on a fresh install with Python 3.5 is averaging 2 frames per second. Using the current release under Python 2.7 the same hardware is getting close to 60FPS.

The cause is currently unknown. Performance under Windows is also noticeably slower with a Debug build getting ~35FPS where it was previously capping out at 60.

Performance data:

LOG:RENDER, 2019-02-28 08:14:34.219757, <views.level_reference.LevelReference object at 0x726a34b0>, 0.6, 0.5, 0.7
LOG:RENDER, 2019-02-28 08:14:34.219757, <views.artificial_horizon.ArtificialHorizon object at 0x726a35d0>,  2.0,  2.1, 27.8
LOG:RENDER, 2019-02-28 08:14:34.219757, <views.altitude.Altitude object at 0x726a36d0>, 486.4,  13.0, 486.4
LOG:RENDER, 2019-02-28 08:14:34.219757, <views.skid_and_gs.SkidAndGs object at 0x72654670>,   1.1,  25.4, 480.4
LOG:RENDER, 2019-02-28 08:14:34.219757, <views.roll_indicator.RollIndicator object at 0x726545d0>,   1.5,   2.8, 151.7
LOG:RENDER, 2019-02-28 08:14:34.219757, <views.groundspeed.Groundspeed object at 0x738d0f10>,   3.4,  16.7, 344.8
LOG:RENDER, 2019-02-28 08:14:34.219757, <views.adsb_on_screen_reticles.AdsbOnScreenReticles object at 0x726795f0>,   1.0,   8.8, 136.1
LOG:RENDER, 2019-02-28 08:14:34.219757, <views.adsb_target_bugs_only.AdsbTargetBugsOnly object at 0x726796d0>,  0.4,  1.3, 50.0
LOG:FRAME, 2019-02-28 08:14:34.219757, Setup,  37.2,  52.8, 303.4
LOG:FRAME, 2019-02-28 08:14:34.219757, Cleanup,  936.2,  155.5, 1218.8
LOG:FRAME, 2019-02-28 08:14:34.219757, Render, 530.3, 166.2, 754.9
LOG:OVERALL, 2019-02-28 08:14:34.219757, FPS, 2.0, 2.4, 4.0
LOG:TRAFFIC, 2019-02-28 08:14:34.219757, MessagesReceived, 198, 198, 198
JohnMarzulli commented 5 years ago

Tried with a custom compiled 3.7 kernel on Raspbian Stretch

2019-02-28 20:14:34,792 - stratux_hud - INFO - -----------------------------------
2019-02-28 20:15:34,088 - stratux_hud - INFO - RENDER, 2019-03-01 04:15:34.072956, <views.level_reference.LevelReference object at 0x719eba10>, 0.2, 0.2, 0.3
2019-02-28 20:15:34,090 - stratux_hud - INFO - RENDER, 2019-03-01 04:15:34.072956, <views.artificial_horizon.ArtificialHorizon object at 0x719ebb10>, 0.9, 0.8, 0.9
2019-02-28 20:15:34,133 - stratux_hud - INFO - RENDER, 2019-03-01 04:15:34.072956, <views.compass_and_heading_bottom_element.CompassAndHeadingBottomElement object at 0x719ebb30>, 1.7, 1.7, 1.9
2019-02-28 20:15:34,169 - stratux_hud - INFO - RENDER, 2019-03-01 04:15:34.072956, <views.altitude.Altitude object at 0x719ebc10>,  0.6,  1.5, 91.3
2019-02-28 20:15:34,448 - stratux_hud - INFO - RENDER, 2019-03-01 04:15:34.072956, <views.skid_and_gs.SkidAndGs object at 0x7114e990>,   0.6,  35.2, 361.7
2019-02-28 20:15:34,491 - stratux_hud - INFO - RENDER, 2019-03-01 04:15:34.072956, <views.roll_indicator.RollIndicator object at 0x7114eb30>, 0.6, 0.7, 0.8
2019-02-28 20:15:34,492 - stratux_hud - INFO - RENDER, 2019-03-01 04:15:34.072956, <views.groundspeed.Groundspeed object at 0x71130f30>, 0.5, 0.5, 1.1
2019-02-28 20:15:34,557 - stratux_hud - INFO - RENDER, 2019-03-01 04:15:34.072956, <views.adsb_on_screen_reticles.AdsbOnScreenReticles object at 0x7116aab0>, 0.7, 1.0, 1.3
2019-02-28 20:15:34,652 - stratux_hud - INFO - RENDER, 2019-03-01 04:15:34.072956, <views.adsb_target_bugs_only.AdsbTargetBugsOnly object at 0x7116ab90>,   0.4,   2.0, 175.8
2019-02-28 20:15:34,770 - stratux_hud - INFO - FRAME, 2019-03-01 04:15:34.072956, Setup,  141.6,   68.4, 2044.3
2019-02-28 20:15:34,922 - stratux_hud - INFO - FRAME, 2019-03-01 04:15:34.072956, Render,   8.6,  55.3, 433.2
2019-02-28 20:15:34,927 - stratux_hud - INFO - FRAME, 2019-03-01 04:15:34.072956, Cleanup,  165.1,  169.2, 3258.1
2019-02-28 20:15:35,030 - stratux_hud - INFO - OVERALL, 2019-03-01 04:15:34.072956, FPS, 4.0, 4.9, 8.0
2019-02-28 20:15:35,135 - stratux_hud - INFO - TRAFFIC, 2019-03-01 04:15:34.072956, MessagesReceived, 25, 25, 25
2019-02-28 20:15:35,554 - stratux_hud - INFO - -----------------------------------
2019-02-28 20:16:34,164 - stratux_hud - INFO - RENDER, 2019-03-01 04:16:34.107833, <views.level_reference.LevelReference object at 0x719eba10>, 0.2, 0.2, 0.3
2019-02-28 20:16:34,467 - stratux_hud - INFO - RENDER, 2019-03-01 04:16:34.107833, <views.artificial_horizon.ArtificialHorizon object at 0x719ebb10>,  0.8,  1.1, 28.7
2019-02-28 20:16:34,571 - stratux_hud - INFO - RENDER, 2019-03-01 04:16:34.107833, <views.compass_and_heading_bottom_element.CompassAndHeadingBottomElement object at 0x719ebb30>,   1.7,  10.9, 711.4
2019-02-28 20:16:34,662 - stratux_hud - INFO - RENDER, 2019-03-01 04:16:34.107833, <views.altitude.Altitude object at 0x719ebc10>,   0.6,  12.6, 899.2
2019-02-28 20:16:34,668 - stratux_hud - INFO - RENDER, 2019-03-01 04:16:34.107833, <views.skid_and_gs.SkidAndGs object at 0x7114e990>,   0.9,  55.3, 971.9
2019-02-28 20:16:34,690 - stratux_hud - INFO - RENDER, 2019-03-01 04:16:34.107833, <views.roll_indicator.RollIndicator object at 0x7114eb30>,  0.6,  1.5, 96.3
2019-02-28 20:16:35,364 - stratux_hud - INFO - RENDER, 2019-03-01 04:16:34.107833, <views.groundspeed.Groundspeed object at 0x71130f30>, 0.5, 0.5, 0.7
2019-02-28 20:16:35,399 - stratux_hud - INFO - RENDER, 2019-03-01 04:16:34.107833, <views.adsb_on_screen_reticles.AdsbOnScreenReticles object at 0x7116aab0>,   1.0,   2.6, 191.3
2019-02-28 20:16:36,328 - stratux_hud - INFO - RENDER, 2019-03-01 04:16:34.107833, <views.adsb_target_bugs_only.AdsbTargetBugsOnly object at 0x7116ab90>,   0.4,   8.0, 576.4
2019-02-28 20:16:37,400 - stratux_hud - INFO - FRAME, 2019-03-01 04:16:34.107833, Setup,   34.0,   88.1, 1462.1
2019-02-28 20:16:37,439 - stratux_hud - INFO - FRAME, 2019-03-01 04:16:34.107833, Render,    9.0,  121.0, 2117.7
2019-02-28 20:16:37,489 - stratux_hud - INFO - FRAME, 2019-03-01 04:16:34.107833, Cleanup,   24.8,  296.8, 2171.6
2019-02-28 20:16:37,519 - stratux_hud - INFO - OVERALL, 2019-03-01 04:16:34.107833, FPS, 3.0, 2.1, 4.0
2019-02-28 20:16:37,570 - stratux_hud - INFO - TRAFFIC, 2019-03-01 04:16:34.107833, MessagesReceived, 200, 200, 200
2019-02-28 20:16:37,638 - stratux_hud - INFO - -----------------------------------
2019-02-28 20:17:34,546 - stratux_hud - INFO - RENDER, 2019-03-01 04:17:34.364677, <views.level_reference.LevelReference object at 0x719eba10>, 0.2, 0.2, 0.4
2019-02-28 20:17:34,960 - stratux_hud - INFO - RENDER, 2019-03-01 04:17:34.364677, <views.artificial_horizon.ArtificialHorizon object at 0x719ebb10>, 0.8, 0.8, 0.9
2019-02-28 20:17:35,136 - stratux_hud - INFO - RENDER, 2019-03-01 04:17:34.364677, <views.compass_and_heading_bottom_element.CompassAndHeadingBottomElement object at 0x719ebb30>,    1.9,   28.6, 1995.0
2019-02-28 20:17:35,151 - stratux_hud - INFO - RENDER, 2019-03-01 04:17:34.364677, <views.altitude.Altitude object at 0x719ebc10>,   0.6,   9.5, 502.3
2019-02-28 20:17:35,222 - stratux_hud - INFO - RENDER, 2019-03-01 04:17:34.364677, <views.skid_and_gs.SkidAndGs object at 0x7114e990>,    0.5,   56.8, 1775.7
2019-02-28 20:17:35,223 - stratux_hud - INFO - RENDER, 2019-03-01 04:17:34.364677, <views.roll_indicator.RollIndicator object at 0x7114eb30>, 489.3,   5.6, 489.3
2019-02-28 20:17:35,255 - stratux_hud - INFO - RENDER, 2019-03-01 04:17:34.364677, <views.groundspeed.Groundspeed object at 0x71130f30>, 0.6, 0.5, 0.8
2019-02-28 20:17:35,515 - stratux_hud - INFO - RENDER, 2019-03-01 04:17:34.364677, <views.adsb_on_screen_reticles.AdsbOnScreenReticles object at 0x7116aab0>,    1.0,   13.6, 1505.1
2019-02-28 20:17:36,365 - stratux_hud - INFO - RENDER, 2019-03-01 04:17:34.364677, <views.adsb_target_bugs_only.AdsbTargetBugsOnly object at 0x7116ab90>,   0.5,   1.5, 101.3
2019-02-28 20:17:36,872 - stratux_hud - INFO - FRAME, 2019-03-01 04:17:34.364677, Setup,    5.4,   91.6, 1269.8
2019-02-28 20:17:37,074 - stratux_hud - INFO - FRAME, 2019-03-01 04:17:34.364677, Render,  552.4,  143.2, 2043.3
2019-02-28 20:17:37,079 - stratux_hud - INFO - FRAME, 2019-03-01 04:17:34.364677, Cleanup,  177.2,  284.8, 3886.7
2019-02-28 20:17:37,080 - stratux_hud - INFO - OVERALL, 2019-03-01 04:17:34.364677, FPS, 3.0, 2.2, 4.0
2019-02-28 20:17:37,081 - stratux_hud - INFO - TRAFFIC, 2019-03-01 04:17:34.364677, MessagesReceived, 94, 94, 94
2019-02-28 20:17:38,208 - stratux_hud - INFO - -----------------------------------
2019-02-28 20:18:34,798 - stratux_hud - INFO - RENDER, 2019-03-01 04:18:34.617207, <views.level_reference.LevelReference object at 0x719eba10>, 0.2, 0.2, 0.3
2019-02-28 20:18:34,809 - stratux_hud - INFO - RENDER, 2019-03-01 04:18:34.617207, <views.artificial_horizon.ArtificialHorizon object at 0x719ebb10>,  0.8,  1.6, 91.6
2019-02-28 20:18:34,812 - stratux_hud - INFO - RENDER, 2019-03-01 04:18:34.617207, <views.compass_and_heading_bottom_element.CompassAndHeadingBottomElement object at 0x719ebb30>,  1.7,  2.4, 56.1
2019-02-28 20:18:34,898 - stratux_hud - INFO - RENDER, 2019-03-01 04:18:34.617207, <views.altitude.Altitude object at 0x719ebc10>,  0.6,  1.5, 91.6
2019-02-28 20:18:35,659 - stratux_hud - INFO - RENDER, 2019-03-01 04:18:34.617207, <views.skid_and_gs.SkidAndGs object at 0x7114e990>,  86.5,  36.1, 489.3
2019-02-28 20:18:36,842 - stratux_hud - INFO - RENDER, 2019-03-01 04:18:34.617207, <views.roll_indicator.RollIndicator object at 0x7114eb30>, 0.7, 0.6, 0.8
2019-02-28 20:18:37,447 - stratux_hud - INFO - RENDER, 2019-03-01 04:18:34.617207, <views.groundspeed.Groundspeed object at 0x71130f30>, 0.5, 0.5, 0.7
2019-02-28 20:18:37,450 - stratux_hud - INFO - RENDER, 2019-03-01 04:18:34.617207, <views.adsb_on_screen_reticles.AdsbOnScreenReticles object at 0x7116aab0>, 1.0, 0.9, 4.6
2019-02-28 20:18:37,458 - stratux_hud - INFO - RENDER, 2019-03-01 04:18:34.617207, <views.adsb_target_bugs_only.AdsbTargetBugsOnly object at 0x7116ab90>,  0.5,  1.2, 93.0
2019-02-28 20:18:37,564 - stratux_hud - INFO - FRAME, 2019-03-01 04:18:34.617207, Setup,  19.4,  84.4, 548.8
2019-02-28 20:18:37,587 - stratux_hud - INFO - FRAME, 2019-03-01 04:18:34.617207, Render,  94.8,  55.7, 497.6
2019-02-28 20:18:37,593 - stratux_hud - INFO - FRAME, 2019-03-01 04:18:34.617207, Cleanup,  186.7,  211.7, 1185.9
2019-02-28 20:18:37,600 - stratux_hud - INFO - OVERALL, 2019-03-01 04:18:34.617207, FPS, 1.0, 3.1, 5.0
2019-02-28 20:18:37,622 - stratux_hud - INFO - TRAFFIC, 2019-03-01 04:18:34.617207, MessagesReceived, 49, 49, 49
2019-02-28 20:18:37,816 - stratux_hud - INFO - -----------------------------------
JohnMarzulli commented 5 years ago

Migration to Python 3.x is taking another direction, this issue is no longer relevant.