do not use getBytesLength because it "generates" the action bytes to get the length (slow)
use instead getTotalActionLength