For the sake of having a reference, Ron Graham shows in "On the growth of a van der Waerden-like function" that for a fixed $k$, there exists a 3AP-free subset of $\{1,2,\dots,N\}$ with gaps bounded by $k$ and $N\geq k^{c\log k}$, where $c$ is some absolute constant that doesn't depend on $k$. Therefore you can get gaps to be even bounded by $\exp(c\sqrt{\log N})$.