reduce memory usage in admin script