Of the two weeks you have mentioned, my guess is that April 2018 will have the lower crowds (although to be fair, there really doesn't seem to be low crowd/no crowd days anymore, unless it's pouring rain). Easter is April 1, 2018, so by the third week of April the majority of the "Spring Breaks" will be over. The biggest drawback is that the parks will likely have gone back to their non-peak season schedule, meaning shorter hours and less entertainment (e.g., fireworks on weekends only).
The latter half of August is a transition period. The parks are moving away from their peak summer operating schedule towards the fall operating schedule (again, with shorter hours and less entertainment). They have not announced when HalloweenTime will start, but the Haunted Mansion usually closes in the latter half of August to have the Nightmare overlay installed. The SoCal and SoCal Select AP blockouts end that Sunday (Aug 20 is the last day), so the weekends thereafter will probably be quite busy as AP holders return to the parks for the first time since summer. There are also some school districts that are still on break.