New issue
Advanced search Search tips

Issue 721519 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner: ----
Closed: Jul 17
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Android , iOS
Pri: 2
Type: Feature



Sign in to add a comment

Add an experimental option to change CroNets network thread priority.

Project Member Reported by matttt@google.com, May 11 2017

Issue description

UserAgent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.96 Safari/537.36

Steps to reproduce the problem:
Feature request for an API to change CroNets internal network thread priority. 

Currently it is set to BACKGROUND by default. 

What is the expected behavior?

What went wrong?
?

Did this work before? N/A 

Chrome version: 58.0.3029.96  Channel: n/a
OS Version: 
Flash Version: Shockwave Flash 25.0 r0
 

Comment 1 by matttt@google.com, May 11 2017

Internal: b/38170831

Comment 2 by mge...@chromium.org, May 11 2017

Components: Internals>Network>Library
Labels: -OS-Linux OS-Android
Status: Untriaged (was: Unconfirmed)
Owner: pauljensen@chromium.org
Status: Started (was: Untriaged)
I took a stab at adding this:
https://codereview.chromium.org/2876253002/
Project Member

Comment 4 by bugdroid1@chromium.org, May 17 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/60fae58468c10337e6538d8334034d590bbc86da

commit 60fae58468c10337e6538d8334034d590bbc86da
Author: pauljensen <pauljensen@chromium.org>
Date: Wed May 17 14:37:32 2017

[Cronet] Add ExperimentalCronetEngine.Builder.setThreadPriority() API

This API allows setting the thread priority of Cronet's internal main thread.

BUG= 721519 
CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.android:android_cronet_tester

Review-Url: https://codereview.chromium.org/2876253002
Cr-Commit-Position: refs/heads/master@{#472449}

[modify] https://crrev.com/60fae58468c10337e6538d8334034d590bbc86da/components/cronet/android/api.txt
[modify] https://crrev.com/60fae58468c10337e6538d8334034d590bbc86da/components/cronet/android/api/src/org/chromium/net/ExperimentalCronetEngine.java
[modify] https://crrev.com/60fae58468c10337e6538d8334034d590bbc86da/components/cronet/android/api/src/org/chromium/net/ICronetEngineBuilder.java
[modify] https://crrev.com/60fae58468c10337e6538d8334034d590bbc86da/components/cronet/android/api_version.txt
[modify] https://crrev.com/60fae58468c10337e6538d8334034d590bbc86da/components/cronet/android/java/src/org/chromium/net/impl/CronetEngineBuilderImpl.java
[modify] https://crrev.com/60fae58468c10337e6538d8334034d590bbc86da/components/cronet/android/java/src/org/chromium/net/impl/CronetUrlRequestContext.java
[modify] https://crrev.com/60fae58468c10337e6538d8334034d590bbc86da/components/cronet/android/java/src/org/chromium/net/impl/JavaCronetEngine.java
[modify] https://crrev.com/60fae58468c10337e6538d8334034d590bbc86da/components/cronet/android/java/src/org/chromium/net/impl/JavaCronetEngineBuilderImpl.java
[modify] https://crrev.com/60fae58468c10337e6538d8334034d590bbc86da/components/cronet/android/test/javatests/src/org/chromium/net/CronetUrlRequestContextTest.java

Status: Fixed (was: Started)
Should be available in next week's dev channel release.
Labels: OS-iOS
Owner: ----
Status: Available (was: Fixed)
Re-open as iOS could use an API like this also.
Project Member

Comment 7 by sheriffbot@chromium.org, Jul 17 2017

Labels: Hotlist-Google
Project Member

Comment 8 by sheriffbot@chromium.org, Jul 17

Labels: Hotlist-Recharge-Cold
Status: Untriaged (was: Available)
This issue has been Available for over a year. If it's no longer important or seems unlikely to be fixed, please consider closing it out. If it is important, please re-triage the issue.

Sorry for the inconvenience if the bug really should have been left as Available.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Status: Fixed (was: Untriaged)
The API for setting thread priority is available in Cronet for Android:

        /**
         * Sets the thread priority of Cronet's internal thread.
         *
         * @param priority the thread priority of Cronet's internal thread.
         *        A Linux priority level, from -20 for highest scheduling
         *        priority to 19 for lowest scheduling priority. For more
         *        information on values, see
         *        {@link android.os.Process#setThreadPriority(int, int)} and
         *        {@link android.os.Process#THREAD_PRIORITY_DEFAULT
         *        THREAD_PRIORITY_*} values.
         * @return the builder to facilitate chaining.
         */
        public Builder setThreadPriority(int priority) {
            mBuilderDelegate.setThreadPriority(priority);
            return this;
        }


as well as iOS:

// Sets priority of the network thread. The |priority| should be a
// floating point number between 0.0 to 1.0, where 1.0 is highest priority.
// This method can be called multiple times before or after |start| method.
+ (void)setNetworkThreadPriority:(double)priority;
 

Sign in to add a comment