fix performance issue with large ruby files