Motion-Project / motionplus

MotionPlus Home Page: https://motion-project.github.io/
GNU General Public License v3.0
319 stars 40 forks source link

Compiler optimization options for g++ #134

Closed denzen84 closed 7 months ago

denzen84 commented 7 months ago

Did you read the guide?

Yes

What is the base version number of MotionPlus being used?

0.1.x

What was the install method?

Built from source code

What is base architecture?

ARM-64bit

What is the distro being used?

Debian

Disto version number

Bookworm

Camera/Sound type(s) being used?

Network camera with RTSP

Describe the issue/problem and steps to reproduce

I successfully migrated from motion 4.6.0 to motionplus 0.2.0. My system is RockPiS (RK3308 64 bit ARM, 4 cores, 1GHz) with 3 network rtsp cameras. Motionplus was built with provided script. As I see, motionplus consumpts significantly more CPU resources (motion 4.6.0 average system load is 1.9-2.1, motionplus average load is 3.6-3.8).

I checked makefile and found no optimization options for g++ (as far as I see, -O2 enabled only for C-compiler). I manually added -O3 option for g++ and recompiled. Visually CPU utilization was reduced at least for 10-15%

Relevant MotionPlus log output (at log_level 8)

None