robotpy / robotpy/mostrobotpy

RobotPy startup on a RoboRIO is slow

Open
#33 16 comments 0 reactions 0 assignees View on GitHub
help wanted
Dominant language
Python
Stars
27
Forks
29
Avg merge
4d 6h
Merged PRs (30d)
12

Description

On my RoboRIO with a 2016 image, I get the following (mostly consistent timing between runs, no DS connected):

```
roboRIO-2423-FRC:~$ time python3 -c 'import hal'

real 0m4.954s
user 0m1.280s
sys 0m0.170s
roboRIO-2423-FRC:~$ time python3 -c 'import wpilib'

real 0m6.984s
user 0m3.270s
sys 0m0.260s
```

HAL library loading may be a big chunk of this:

```
roboRIO-2423-FRC:~$ time python3 -c 'import ctypes; ctypes.CDLL("/usr/local/lib/python3.5/site-packages/hal_impl/libHALAthena.so")'

real 0m3.093s
user 0m0.470s
sys 0m0.070s
```

As a baseline:

```
roboRIO-2423-FRC:~$ time python3 -c 'pass'

real 0m0.210s
user 0m0.180s
sys 0m0.020s
roboRIO-2423-FRC:~$ time python3 -c 'import pip'

real 0m3.002s
user 0m2.760s
sys 0m0.220s
```

It would be good to reduce the startup time somehow.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.