I’ve got an RPi0 with a PiPixel hat to run a string of APA102 LEDs. I have a script that is running different project files based on different conditions. While setting this up and playing with bp in general on this platform, I’ve observed long startup times for BP on the RPi0, typically 10-12 seconds. It looks like BP pegs at 100% CPU usage while it’s performing whatever setup it’s doing.
It doesn’t seem to be directly related to my project, as even just running ‘bp’ on it’s own also hangs for 10 seconds before returning the usage info.
pi@cubelights:~/projects $ time bp
bp
- The BiblioPixel Project Runner
bp
is a command-line script installed with Bibliopixel. It can run
projects and demos, configure hardware, save and load defaults, and more.
bp
takes one of 20 commands:
all_pixel, all_pixel_test, clear_cache, color, demo, devices, info, list
load, monitor, pid, remove, reset, restart, run, save, set, show, shutdown, update
Some commands take arguments - often names of files.Examples of
bp
commands and argumentsbp info
bp demo circle
bp run foo.json bar.json
bp foo.json bar.json # run is the default commandThe commands are summarized below, and you can get more detailed help about
each one by typing:bp --help
or
bp -h
The
bp
command line
bp
commands have flags that control howbp
runs its commands.
Examples of flags are-v
,--verbose
,--defaults
,-d
,
--simpixel
. Flags either start with-
, for one letter flags, or--
for multi-letter flags.
Sometimes two flags have the same meaning, like--simpixel
and-s
or--verbose
and-v
.
Some flags take an argument, like--dim=160
or--loglevel=frame
.
Other flags do not, like--verbose
or-v
.
Abp
command line can optionally include a command, a list of arguments,
and a list of flags:bp [] [ …] [ …]
Examples of
bp
command linesbp info --help
bp run -h
bp info
bp color “indian red 4”
bp foo.json bar.json -v
bp foo.json bar.json -v --numbers=float --dump --defaults=default.jsonusage: bp [-h]
{all_pixel,all_pixel_test,clear_cache,color,demo,devices,info,list,load,monitor,pid,remove,reset,restart,run,save,set,show,shutdown,update}
…
positional arguments:
{all_pixel,all_pixel_test,clear_cache,color,demo,devices,info,list,load,monitor,pid,remove,reset,restart,run,save,set,show,shutdown,update}
all_pixel Configure the AllPixel or similar module
all_pixel_test Test the all_pixel.
clear_cache Clear the loady git repository library cache
color Toggle between color names and color tuples
demo Run a bibliopixel demo.
devices Find serial devices and update serial device IDs
info Print information about BiblioPixel
list List all user project default files
load Load a saved project default file
monitor Monitor a control source
pid Print the process ID of the current bp instance that
is running a project, if any.
remove Remove a project default file
reset Reset sections in the project defaults
restart Send a restart signal to a BiblioPixel process running
on this machine.
run Run specified project from file or URL.
save Save the current project defaults to a file
set Set some or all sections of the project defaults
show Show all project default values
shutdown Send an interrupt signal to a BiblioPixel process
running on this machine to kill it.
update Update BiblioPixel’s dependencies
optional arguments:
-h, --help show this help message and exit
real 0m11.547s
user 0m10.567s
sys 0m0.352s
Any idea what causes the process to take so long to start up? Anything that I can change config wise to improve this startup time?