Skip to content
This repository has been archived by the owner on Mar 30, 2021. It is now read-only.

Dark style has poor performance #90

Closed
kbhomes opened this issue Mar 24, 2014 · 0 comments
Closed

Dark style has poor performance #90

kbhomes opened this issue Mar 24, 2014 · 0 comments
Milestone

Comments

@kbhomes
Copy link
Member

kbhomes commented Mar 24, 2014

To achieve the colors I wanted for the dark styles, I often use -webkit-filter: invert(...), however this has proved to deteriorate performance on some parts of the Google Music pages. I'm not entirely certain yet whether this is due to poorly written CSS selectors or due to the repeated use of -webkit-filter.

The primary areas of performance trouble I could isolate were:

  • The thumbs up/down images in each row are implemented as background-images, so in order to change their color to a light alternative, I have to use the invert filter on each row that has a rating. When you scroll through a list of music with many rated songs, the application loses its smoothness.
  • Certain player buttons (play, pause, etc.) are inverted using filters in order to make them match the dark scheme, however this also degrades performance, but only when a song is currently playing.

Possible solution that I am considering implementing is to download the spritesheet when the application first loads, invert it with Core Image, hook up a custom NSURLProtocol to point to the inverted image, and then update all CSS classes that require inverts to instead use the inverted image as their background image URL.

Anyways, we'll see, that'll come in v1.1.3 at the earliest.

@kbhomes kbhomes added this to the v1.1.3 milestone Mar 24, 2014
@kbhomes kbhomes mentioned this issue Apr 6, 2014
@kbhomes kbhomes closed this as completed in fba0972 Apr 6, 2014
kbhomes added a commit that referenced this issue Apr 7, 2014
* master: (24 commits)
  Fix mini player location at edge of screen, multiple screens (fixes #108)
  Use an NSURLProtocol instead of data: URIs (fixes #123)
  Tweak preferences window height
  Fix notifications on Safari 6/OS X 10.8 (fixes #92)
  Fix CSS for Safari 6 and OS X 10.8 (fixes #91)
  Fix mini player to work on OS X 10.8 (fixes #106)
  Modify dark.css, CustomWebView to use/hold inverted sprite sheet (fixes #90, #120)
  Revert event tap creation, fixes QuickLook but breaks Fireworks (fixes #117)
  Remember last size of mini player (fixes #96)
  Revert "Fix timestamp alignment in Last.fm popover"
  Fix timestamp alignment in Last.fm popover
  Update Last.fm API keys
  Add preference to automatically love/unlove a track on Last.fm based on thumbs up rating (fixes #83)
  Add preference for showing the Last.fm button
  Add ability to love/unlove song from Last.fm popover
  Append Last.fm icon instead of replacing other links
  Add Last.fm popover that shows 10 most recent tracks
  Add NSDate+TimeAgo to podfile
  Update Last.fm icon in preferences
  Fix album title color in dark style (fixes #101, thanks @Deanmv)
  ...
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant