electron/atom/browser
Thiago de Arruda 6ff111a141 perf: don't use JSON to send the result of ipcRenderer.sendSync. (#8953)
* Don't use JSON to send the result of `ipcRenderer.sendSync`.

- Change the return type of AtomViewHostMsg_Message_Sync from `base::string16`
  to `base::ListValue`
- Adjust lib/browser/api/web-contents.js and /lib/renderer/api/ipc-renderer.js
  to wrap/unwrap return values to/from array, instead of
  serializing/deserializing JSON.

This change can greatly improve `ipcRenderer.sendSync` calls where the return
value contains Buffer instances, because those are converted to Array before
being serialized to JSON(which has no efficient way of representing byte
arrays).

A simple benchmark where remote.require('fs') was used to read a 16mb file got
at least 5x faster, not to mention it used a lot less memory.  This difference
tends increases with larger buffers.

* Don't base64 encode Buffers

* Don't allocate V8ValueConverter on the heap

* Replace hidden global.sandbox with NodeBindings::IsInitialized()

* Refactoring: check NodeBindings::IsInitialized() in V8ValueConverter

* Refactor problematic test to make it more reliable

* Add tests for NaN and Infinity
2018-06-13 17:38:31 +10:00
..
api perf: don't use JSON to send the result of ipcRenderer.sendSync. (#8953) 2018-06-13 17:38:31 +10:00
lib Refactoring: use C++11 class member variable initialization 2018-05-22 00:18:38 +02:00
loader ResourceHandler API has been changed 2017-04-27 16:34:52 +09:00
mac clang-format objc files (#12673) 2018-04-20 11:47:04 -07:00
net Refactoring: use C++11 class member variable initialization 2018-05-22 00:18:38 +02:00
osr Refactoring: use C++11 class member variable initialization 2018-05-22 00:18:38 +02:00
resources clang-format atom files 2018-04-18 20:48:45 -04:00
ui fix: tray icon bounds didn't allow negative macOS (#13162) 2018-06-07 18:48:39 +02:00
atom_access_token_store.h [chromium-style] destructors of ref-counted objects should be private 2018-04-19 11:12:10 -07:00
atom_blob_reader.cc Part I: Move from base::Bind to base::BindOnce and remove unneeded base::Passed (#12661) 2018-04-20 19:55:05 +09:00
atom_blob_reader.h clang-format atom files 2018-04-18 20:48:45 -04:00
atom_browser_client.cc chore: move more constants to options_switches.h/cc (#13093) 2018-05-29 03:09:51 -05:00
atom_browser_client.h Refactoring: use C++11 class member variable initialization 2018-05-22 00:18:38 +02:00
atom_browser_context.cc [chromium-style] auto variable type must not deduce to a raw pointer type 2018-04-19 11:10:52 -07:00
atom_browser_context.h clang-format atom files 2018-04-18 20:48:45 -04:00
atom_browser_main_parts.cc Refactoring: use C++11 class member variable initialization 2018-05-22 00:18:38 +02:00
atom_browser_main_parts.h Refactoring: use C++11 class member variable initialization 2018-05-22 00:18:38 +02:00
atom_browser_main_parts_mac.mm clang-format objc files (#12673) 2018-04-20 11:47:04 -07:00
atom_browser_main_parts_posix.cc also format missing .cc files 2018-04-18 20:48:45 -04:00
atom_download_manager_delegate.cc chore: move more constants to options_switches.h/cc (#13093) 2018-05-29 03:09:51 -05:00
atom_download_manager_delegate.h [chromium-style] override / virtual warnings 2018-04-19 11:12:10 -07:00
atom_javascript_dialog_manager.cc chore: move more constants to options_switches.h/cc (#13093) 2018-05-29 03:09:51 -05:00
atom_javascript_dialog_manager.h [chromium-style] out-of-line default constructors and destructors 2018-04-19 11:12:58 -07:00
atom_permission_manager.cc [chromium-style] auto variable type must not deduce to a raw pointer type 2018-04-19 11:10:52 -07:00
atom_permission_manager.h clang-format atom files 2018-04-18 20:48:45 -04:00
atom_quota_permission_context.cc also format missing .cc files 2018-04-18 20:48:45 -04:00
atom_quota_permission_context.h [chromium-style] destructors of ref-counted objects should be private 2018-04-19 11:12:10 -07:00
atom_resource_dispatcher_host_delegate.cc chore: move more constants to options_switches.h/cc (#13093) 2018-05-29 03:09:51 -05:00
atom_resource_dispatcher_host_delegate.h address review comments 2017-03-14 00:26:27 +05:30
atom_speech_recognition_manager_delegate.cc also format missing .cc files 2018-04-18 20:48:45 -04:00
atom_speech_recognition_manager_delegate.h [chromium-style] override / virtual warnings 2018-04-19 11:12:10 -07:00
atom_web_ui_controller_factory.cc also format missing .cc files 2018-04-18 20:48:45 -04:00
atom_web_ui_controller_factory.h [chromium-style] override / virtual warnings 2018-04-19 11:12:10 -07:00
auto_updater.cc also format missing .cc files 2018-04-18 20:48:45 -04:00
auto_updater.h clang-format atom files 2018-04-18 20:48:45 -04:00
auto_updater_mac.mm clang-format objc files (#12673) 2018-04-20 11:47:04 -07:00
bridge_task_runner.cc [chromium-style] out-of-line default constructors and destructors 2018-04-19 11:12:58 -07:00
bridge_task_runner.h [chromium-style] out-of-line default constructors and destructors 2018-04-19 11:12:58 -07:00
browser.cc Refactoring: use C++11 class member variable initialization 2018-05-22 00:18:38 +02:00
browser.h Refactoring: use C++11 class member variable initialization 2018-05-22 00:18:38 +02:00
browser_linux.cc refactor: chromium-style warnings in linux code (#12949) 2018-05-16 14:12:45 -05:00
browser_mac.mm clang-format objc files (#12673) 2018-04-20 11:47:04 -07:00
browser_observer.h clang-format atom files 2018-04-18 20:48:45 -04:00
browser_win.cc also format missing .cc files 2018-04-18 20:48:45 -04:00
child_web_contents_tracker.cc Fix cpplint errors 2017-04-12 12:25:56 +09:00
child_web_contents_tracker.h Fix cpplint errors 2017-04-12 12:25:56 +09:00
common_web_contents_delegate.cc chore: move more constants to options_switches.h/cc (#13093) 2018-05-29 03:09:51 -05:00
common_web_contents_delegate.h Refactoring: use C++11 class member variable initialization 2018-05-22 00:18:38 +02:00
common_web_contents_delegate_mac.mm The Blink Rename 2017-08-15 16:19:20 +03:00
common_web_contents_delegate_views.cc also format missing .cc files 2018-04-18 20:48:45 -04:00
javascript_environment.cc Fix up #includes to work with both GYP and GN 2018-05-10 13:38:40 -07:00
javascript_environment.h [chromium-style] out-of-line default constructors and destructors 2018-04-19 11:12:58 -07:00
login_handler.cc Refactoring: use C++11 class member variable initialization 2018-05-22 00:18:38 +02:00
login_handler.h Refactoring: use C++11 class member variable initialization 2018-05-22 00:18:38 +02:00
native_browser_view.cc Make BrowserView DragRegionViews children of the WebContents view 2018-03-19 20:45:40 +02:00
native_browser_view.h clang-format atom files 2018-04-18 20:48:45 -04:00
native_browser_view_mac.h Store InspectableWebContents instead of InspectableWebContentsView in NativeBrowserView 2018-03-19 20:44:05 +02:00
native_browser_view_mac.mm clang-format objc files (#12673) 2018-04-20 11:47:04 -07:00
native_browser_view_views.cc refactor: chromium-style warnings in linux code (#12949) 2018-05-16 14:12:45 -05:00
native_browser_view_views.h refactor: chromium-style warnings in linux code (#12949) 2018-05-16 14:12:45 -05:00
native_window.cc Refactoring: use C++11 class member variable initialization 2018-05-22 00:18:38 +02:00
native_window.h Refactoring: use C++11 class member variable initialization 2018-05-22 00:18:38 +02:00
native_window_mac.h Refactoring: use C++11 class member variable initialization 2018-05-22 00:18:38 +02:00
native_window_mac.mm Refactoring: use C++11 class member variable initialization 2018-05-22 00:18:38 +02:00
native_window_observer.h clang-format atom files 2018-04-18 20:48:45 -04:00
native_window_views.cc Refactoring: use C++11 class member variable initialization 2018-05-22 00:18:38 +02:00
native_window_views.h Refactoring: use C++11 class member variable initialization 2018-05-22 00:18:38 +02:00
native_window_views_win.cc remove appcommand media-play_pause option deprecation 2018-05-23 09:24:32 -07:00
node_debugger.cc [chromium-style] auto variable type must not deduce to a raw pointer type 2018-04-19 11:10:52 -07:00
node_debugger.h clang-format atom files 2018-04-18 20:48:45 -04:00
relauncher.cc also format missing .cc files 2018-04-18 20:48:45 -04:00
relauncher.h
relauncher_linux.cc Improve process launch handle sharing API. 2018-02-23 10:21:24 +09:00
relauncher_mac.cc also format missing .cc files 2018-04-18 20:48:45 -04:00
relauncher_win.cc also format missing .cc files 2018-04-18 20:48:45 -04:00
render_process_preferences.cc Refactoring: use C++11 class member variable initialization 2018-05-22 00:18:38 +02:00
render_process_preferences.h Refactoring: use C++11 class member variable initialization 2018-05-22 00:18:38 +02:00
session_preferences.cc also format missing .cc files 2018-04-18 20:48:45 -04:00
session_preferences.h clang-format atom files 2018-04-18 20:48:45 -04:00
unresponsive_suppressor.cc
unresponsive_suppressor.h
web_contents_permission_helper.cc [chromium-style] auto variable type must not deduce to a raw pointer type 2018-04-19 11:10:52 -07:00
web_contents_permission_helper.h clang-format atom files 2018-04-18 20:48:45 -04:00
web_contents_preferences.cc Merge pull request #13050 from electron/3.0.0-deprecations 2018-05-30 09:25:36 +02:00
web_contents_preferences.h Fix error caused by refactor 2018-03-22 15:21:56 +09:00
web_contents_zoom_controller.cc Refactoring: use C++11 class member variable initialization 2018-05-22 00:18:38 +02:00
web_contents_zoom_controller.h Refactoring: use C++11 class member variable initialization 2018-05-22 00:18:38 +02:00
web_dialog_helper.cc Fix empty description when only one extension is given 2018-05-16 01:58:58 +02:00
web_dialog_helper.h clang-format atom files 2018-04-18 20:48:45 -04:00
web_view_guest_delegate.cc Refactoring: use C++11 class member variable initialization 2018-05-22 00:18:38 +02:00
web_view_guest_delegate.h Refactoring: use C++11 class member variable initialization 2018-05-22 00:18:38 +02:00
web_view_manager.cc [chromium-style] auto variable type must not deduce to a raw pointer type 2018-04-19 11:10:52 -07:00
web_view_manager.h clang-format atom files 2018-04-18 20:48:45 -04:00
window_list.cc [chromium-style] auto variable type must not deduce to a raw pointer type 2018-04-19 11:10:52 -07:00
window_list.h Add IsEmpty helper and remove GetInstance public usage 2017-04-11 09:09:17 -07:00
window_list_observer.h