Code restructure of portal render limit handler