Put more code under non-GIL block