Skip to content

Optimize loading#6

Merged
MrSir merged 7 commits intomainfrom
optimize_loading
Jan 22, 2026
Merged

Optimize loading#6
MrSir merged 7 commits intomainfrom
optimize_loading

Conversation

@MrSir
Copy link
Owner

@MrSir MrSir commented Jan 22, 2026

WHY?

The app used to take upwards of 30s to prepare the data and render the ui after the initial selection. This made it look like it froze. It needed optimization.

WHAT?

  • took a different approach with merging the pos and lap data that removed 20s of the loading time
  • offloaded the data processing to a separate thread task chain to optimize things further
  • built a loading screen
  • added some useful boolean flag options to the main app class
  • fixed the main app window from being resized.

@github-actions
Copy link

Coverage

Coverage Report
FileStmtsMissCoverMissing
src/f1p
   __init__.py493329%23–48, 52–55, 58–63, 66–69, 72–101
   main.py440%1–6
src/f1p/services/data_extractor
   __init__.py37728722%37–72, 76–79, 83–86, 90–93, 97–100, 104–107, 111–114, 118–121, 124–127, 131–134, 138–141, 145–148, 152–183, 187–191, 195, 199, 203, 207, 211–214, 218, 222–225, 229, 233–238, 241–278, 282–285, 288–296, 299–308, 311–320, 323–329, 332–339, 342–348, 351–359, 362–425, 428–464, 467–488, 491–500, 503–512, 515–533, 536–550, 553–574, 577–589, 592–612, 615–637, 640–658, 669, 672–674, 677–678, 681–707
   enums.py19289%13, 25
src/f1p/ui/components
   driver.py624625%30–54, 58, 62–76, 86, 100–119
   map.py826617%15–28, 32–65, 68–88, 91–95, 98–107, 110, 113–116
   menu.py755326%26–37, 41, 44, 51–64, 67–81, 84–97, 100, 116–123, 128, 144–147
   origin.py191426%6, 9–17, 20–28
   playback.py1088022%31–55, 58, 66–78, 81–84, 87, 100–102, 105–125, 143–149, 152, 171–184, 187–197, 200, 219, 222–230
src/f1p/ui/components/gui
   button.py8450%7–18
   drop_down.py1121018%30–86, 94–202, 205–212, 215–219, 222–225
src/f1p/ui/components/leaderboard
   __init__.py1138323%33–66, 70–73, 77–80, 83, 91–98, 106–112, 115–122, 132–139, 149–155, 158, 179–255, 258–313, 316, 319–327
src/f1p/ui/components/leaderboard/processors
   __init__.py1621456%27–39, 44–121, 126–161, 164–177, 180–181, 186–221, 226–245
src/f1p/utils
   color.py8625%6–17
   geometry.py383021%6–11, 15–18, 22–33, 43, 51–62, 66–77
   performance.py12120%1–19
TOTAL124896619% 

Tests Skipped Failures Errors Time
5 0 💤 0 ❌ 0 🔥 3.633s ⏱️

@github-actions
Copy link

Coverage

Coverage Report
FileStmtsMissCoverMissing
src/f1p
   __init__.py493329%23–48, 52–61, 64–69, 72–75, 78–107
   main.py440%1–5
src/f1p/services/data_extractor
   __init__.py37728722%37–72, 76–79, 83–86, 90–93, 97–100, 104–107, 111–114, 118–121, 124–127, 131–134, 138–141, 145–148, 152–183, 187–191, 195, 199, 203, 207, 211–214, 218, 222–225, 229, 233–238, 241–278, 282–285, 288–296, 299–308, 311–320, 323–329, 332–339, 342–348, 351–359, 362–425, 428–463, 466–486, 489–498, 501–510, 513–531, 534–548, 551–572, 575–587, 590–609, 612–634, 637–655, 666, 669–671, 674–675, 678–704
   enums.py19289%13, 25
src/f1p/ui/components
   driver.py624625%30–54, 58, 62–76, 86, 100–119
   map.py826617%15–28, 32–65, 68–88, 91–95, 98–107, 110, 113–116
   menu.py755326%26–37, 41, 44, 51–64, 67–81, 84–97, 100, 116–123, 128, 144–147
   origin.py191426%6, 9–17, 20–28
   playback.py1088022%31–55, 58, 66–78, 81–84, 87, 100–102, 105–125, 143–149, 152, 171–184, 187–197, 200, 219, 222–230
src/f1p/ui/components/gui
   button.py8450%7–18
   drop_down.py1121018%30–86, 94–202, 205–212, 215–219, 222–225
src/f1p/ui/components/leaderboard
   __init__.py1138323%33–66, 70–73, 77–80, 83, 91–98, 106–112, 115–122, 132–139, 149–155, 158, 179–255, 258–313, 316, 319–327
src/f1p/ui/components/leaderboard/processors
   __init__.py1621456%27–39, 44–121, 126–161, 164–177, 180–181, 186–221, 226–245
src/f1p/utils
   color.py8625%6–17
   geometry.py383021%6–11, 15–18, 22–33, 43, 51–62, 66–77
   performance.py12120%1–19
TOTAL124896619% 

Tests Skipped Failures Errors Time
5 0 💤 0 ❌ 0 🔥 2.855s ⏱️

@MrSir MrSir merged commit f91bdbe into main Jan 22, 2026
4 checks passed
@MrSir MrSir deleted the optimize_loading branch January 22, 2026 01:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant