Made editing product only update subcategory and category if there was a change instead of doing a query on it every time.
added image lol.png from testing pictures.