Skip to content
Permalink
Browse files

Improve location-bar performance by disabling the automatic resize of…

… the window
  • Loading branch information...
pfrazee committed Mar 14, 2019
1 parent 427d09c commit 5b2dddaf785abc1b2e6fcb090105d14992ab4429
Showing with 10 additions and 4 deletions.
  1. +2 −1 app/location-bar.html
  2. +8 −3 app/location-bar.js
@@ -6,9 +6,10 @@
body {
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Ubuntu, Cantarell, "Oxygen Sans", "Helvetica Neue", sans-serif;
margin: 0;
background: #fafafa;
background: #fff;
font-size: 12px;
color: rgba(0, 0, 0, 0.8);
overflow: hidden;
}
body.win32 {
border: 1px solid #bbb;
@@ -136,9 +136,14 @@ class LocationBar extends LitElement {
}

resize () {
// DISABLED
// this was causing major performance costs
// maybe we should use transparent windows instead?
// -prf

// adjust height based on rendering
var height = this.shadowRoot.querySelector('div').clientHeight
bg.locationBar.resizeSelf({height})
// var height = this.shadowRoot.querySelector('div').clientHeight
// bg.locationBar.resizeSelf({height})
}

async queryAutocomplete () {
@@ -169,7 +174,7 @@ class LocationBar extends LitElement {
}

// apply limit
finalResults = finalResults.slice(0, 10)
finalResults = finalResults.slice(0, 11)

// read bookmark state
await Promise.all(finalResults.map(async r => {

0 comments on commit 5b2ddda

Please sign in to comment.
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.