Added configurable limit threshold in node generation to find optimum performance