From 5a9267283c05ba70822ae27a8496c95cdd4a1058 Mon Sep 17 00:00:00 2001 From: Tom Hite Date: Mon, 15 Sep 2014 01:31:03 +0000 Subject: performance profile support Many device trees support the recovery.perf.mode property to set various core frequencies and online/offline mode. TWRP is highly threaded, and support for multiple cores on many operations dramatically recudes the time, e.g., backups, zip flashes, etc. p2: removed user notifications Change-Id: I957b8ca40b241c0af0471327eeb329cce1816017 --- gui/action.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'gui/action.cpp') diff --git a/gui/action.cpp b/gui/action.cpp index 7e432226e..398ef503a 100644 --- a/gui/action.cpp +++ b/gui/action.cpp @@ -853,7 +853,9 @@ int GUIAction::doAction(Action action, int isThreaded /* = 0 */) DataManager::SetValue("tw_filename", zip_queue[i]); DataManager::SetValue(TW_ZIP_INDEX, (i + 1)); + TWFunc::SetPerformanceMode(true); ret_val = flash_zip(zip_queue[i], arg, simulate, &wipe_cache); + TWFunc::SetPerformanceMode(false); if (ret_val != 0) { gui_print("Error flashing zip '%s'\n", zip_queue[i].c_str()); i = 10; // Error flashing zip - exit queue @@ -1416,10 +1418,12 @@ int GUIAction::doAction(Action action, int isThreaded /* = 0 */) DataManager::GetValue("tw_restore", Restore_Path); Restore_Path += "/"; DataManager::GetValue("tw_restore_password", Password); + TWFunc::SetPerformanceMode(true); if (TWFunc::Try_Decrypting_Backup(Restore_Path, Password)) op_status = 0; // success else op_status = 1; // fail + TWFunc::SetPerformanceMode(false); } operation_end(op_status, simulate); -- cgit v1.2.3