Closed Bug 957037 Opened 7 years ago Closed 7 years ago

Pull in Android's ProxySelectorImpl code so we can bypass creating Uri objects

Categories

(Firefox for Android :: General, defect)

All
Android
defect
Not set
normal

Tracking

()

RESOLVED FIXED
Firefox 29

People

(Reporter: mfinkle, Assigned: mfinkle)

References

(Blocks 1 open bug)

Details

Attachments

(1 file, 1 obsolete file)

Attached patch Custom proxy selector v0.1 (obsolete) — Splinter Review
Even after fixing bug XXX, GeckoAppShell.getProxyForURI still takes up ~230ms when loading cnn.com, mainly because we need to create Uri objects. We can avoid this. We already pass the raw scheme and host to getProxyForURI and Android just extracts those from the Uri we make.

This patch pulls in the implementation with a new entry point, which takes a scheme and host directly. Initial profiles show that getProxyForURI is now in the ~25ms range when loading cnn.com.

What's the best way to test this, especially on gingerbread up to kitkat?
I assume we should keep the Android source license since much of the file is unchanged.
Attachment #8356457 - Flags: feedback?(blassey.bugs)
Blocks: 947390
Assignee: nobody → mark.finkle
Status: NEW → ASSIGNED
Depends on: 952799
OS: Linux → Android
Hardware: x86_64 → All
Comment on attachment 8356457 [details] [diff] [review]
Custom proxy selector v0.1

Review of attachment 8356457 [details] [diff] [review]:
-----------------------------------------------------------------

::: mobile/android/base/util/ProxySelector.java
@@ +11,5 @@
> + * distributed under the License is distributed on an "AS IS" BASIS,
> + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
> + * See the License for the specific language governing permissions and
> + * limitations under the License.
> + */

just add a comment as to where this code came from
Attachment #8356457 - Flags: feedback?(blassey.bugs) → feedback+
Added a comment
Attachment #8356457 - Attachment is obsolete: true
Attachment #8356739 - Flags: review?(blassey.bugs)
Comment on attachment 8356739 [details] [diff] [review]
Custom proxy selector v0.2

Review of attachment 8356739 [details] [diff] [review]:
-----------------------------------------------------------------

::: mobile/android/base/util/ProxySelector.java
@@ +13,5 @@
> + * See the License for the specific language governing permissions and
> + * limitations under the License.
> + */
> +
> +// This code is based on /libcore/luni/src/main/java/java/net/ProxySelectorImpl.java

// This code is based on AOSP's /libcore....
Attachment #8356739 - Flags: review?(blassey.bugs) → review+
https://hg.mozilla.org/mozilla-central/rev/0b085ae22f9d
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 29
You need to log in before you can comment on or make changes to this bug.