android_packages_modules_Co.../staticlibs/device
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Shai Barack 7c0faeeb68 Replace String.split() with precompiled regex
String.split() will allocate and compile the given regex on every call.
The networkstack process spends 2.8% of cycles doing this.

https://pprof.corp.google.com/?id=%2Fcns%2Fpf-d%2Fhome%2Fandroid-telemetry-pitot-pprof-prod-data-owner%2Fstack_sampling_pprof%2F2025-06-07%2Fstack-sampling-pprof-6187fab4-56da-4842-b9c3-9d8db45801d1.pb.gz&metric=samples&filter=hide:%255Enterp_helper%2524,focus:regex%257Csplit&pivot=com.android.networkstack.com.android.net.module.util.ProcfsParsingUtils

I randomly noticed this while looking at CPU profiles.

Flag: EXEMPT refactor
Test: ApfFilterTest and any others that may be exercising the code
Change-Id: I811c0e8982a87d10fedcda93379b08e8ab38a11b
2025-06-07 19:46:06 -07:00
..
android/net Add null check for mProvider 2022-04-27 11:25:11 +00:00
com/android/net/module/util Replace String.split() with precompiled regex 2025-06-07 19:46:06 -07:00