Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:Ledest:erlang:23
erlang
8081-Skip-passing-full-state-to-application-sta...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 8081-Skip-passing-full-state-to-application-starter-proce.patch of Package erlang
From 99f3e46762b02795b75e93008ee151baa9e5602a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Muska=C5=82a?= <micmus@fb.com> Date: Tue, 23 Jan 2024 13:27:37 +0000 Subject: [PATCH 1/6] Skip passing full state to application starter process Only the running field is used, we can pass just that. This saves on copying a lot of extra data since the state can get rather large. --- lib/kernel/src/application_controller.erl | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/lib/kernel/src/application_controller.erl b/lib/kernel/src/application_controller.erl index 60080c155e..6d9ee8a9df 100644 --- a/lib/kernel/src/application_controller.erl +++ b/lib/kernel/src/application_controller.erl @@ -1388,26 +1388,25 @@ do_start(AppName, RT, Type, From, S) -> end. spawn_starter(From, Appl, S, Type) -> - spawn_link(?MODULE, init_starter, [From, Appl, S, Type]). + spawn_link(?MODULE, init_starter, [From, Appl, S#state.running, Type]). -init_starter(_From, Appl, S, Type) -> +init_starter(_From, Appl, Running, Type) -> process_flag(trap_exit, true), AppName = Appl#appl.name, - gen_server:cast(?AC, {application_started, AppName, - catch start_appl(Appl, S, Type)}). + gen_server:cast(?AC, {application_started, AppName, + catch start_appl(Appl, Running, Type)}). reply(undefined, _Reply) -> ok; reply(From, Reply) -> gen_server:reply(From, Reply). -start_appl(Appl, S, Type) -> +start_appl(Appl, Running, Type) -> ApplData = Appl#appl.appl_data, case ApplData#appl_data.mod of [] -> {ok, undefined}; _ -> %% Name = ApplData#appl_data.name, - Running = S#state.running, foreach( fun(AppName) -> case lists:keymember(AppName, 1, Running) orelse -- 2.35.3
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor