editor: optim json queries and cache results