Choice of sample size for high transport critical current density in a granular superconductor: percolation versus self-field effects