optimize perf-sensitive LayerGroup methods