Targeted Bottleneck #1: Rule Matching EECS Electrical Engineering and Computer Sciences B ERKELEY P AR L AB Parallel Cascading Style Sheets Leo Meyerovich,

Slides:



Advertisements
Similar presentations
Copenhagen, 6 December 2004 Modern CSS Principles Miruna Bădescu Finsiel Romania.
Advertisements

XML III. Learning Objectives Formatting XML Documents: Overview Using Cascading Style Sheets to format XML documents Using XSL to format XML documents.
HTML Basics Customizing your site using the basics of HTML.
Introduction to HTML & CSS
Other examples Interactive expanding/collapsing tree diagram Clicking nodes in the tree alters the value of a CSVG variable which in turn changes the visibility.
With Microsoft FrontPage 2003 Publishing a Web Page.
Cascading Style Sheets CSS. What is it? Another file format ! its not like html Describes the looks of “selectors” in a.css file (example.css) in the.
1 Pengantar Teknologi Internet W03: CSS Cascading Style Sheets.
CONCEPTS FOR FLUID LAYOUT Web Page Layout. Website Layouts Most websites have organized their content in multiple columns (formatted like a magazine or.
XHTML and CSS Overview. Hypertext Markup Language A set of markup tags and associated syntax rules Unlike a programming language, you cannot describe.
CSS Basics LIS Webteam April 8, Why CSS? What’s wrong with HTML? Structure vs Style Early web design used hacks to style webpages with HTML – like.
Parallel Web Browser: Layout and Animation Language Ras Bodik, Thibaud Hottelier, James Ide, Doug Kimelman (IBM), Kimmo Kuusilinna (Nokia), Per Ljung (Nokia)
Tutorial 4 Creating Special Effects with CSS
The.htm/.html Mystery When saving the template files in Internet Explorer, they will be named.htm by default. To be consistent with how the code was written.
XHTML and CSS Overview. Hypertext Markup Language A set of markup tags and associated syntax rules Unlike a programming language, you cannot describe.
4.01 Cascading Style Sheets
Developing a Basic Web Page with HTML
CSS (Cascading Style Sheets): How the web is styled Create Rules that specify how the content of an HTML Element should appear. CSS controls how your web.
 Using Microsoft Expression Web you can: › Create Web pages and Web sites › Set what you site will look like as you design it › Add text, images, multimedia.
Chapter 4 Dreamweaver: Part II The Web Warrior Guide to Web Design Technologies.
DHTML. What is DHTML?  DHTML is the combination of several built-in browser features in fourth generation browsers that enable a web page to be more.
Tutorial 6 Creating Tables and CSS Layouts. Objectives Session 6.1 – Create a data table to display and organize data – Modify table properties and layout.
Week 4.  Three ways to apply CSS: Inline CSS Internal style sheets ( header style information) External style sheets.
Tutorial 4 Creating Special Effects with CSS. XP Objectives Work with CSS selectors Create styles for lists Create and apply class styles Create a rollover.
INTRODUCTION TO HTML5 CSS Styles. Understanding Style Sheets  HTML5 enables you to define many different types of content on a web page, including headings,
IS432 Semi-Structured Data Lecture 5: XSLT Dr. Gamal Al-Shorbagy.
CSS Positioning Creating Special Effects with CSS CS202 Working with Cascading Style Sheets (Chapter 4) CS202 1.
Analysis of DOM Structures for Site-Level Template Extraction (PSI 2015) Joint work done in colaboration with Julián Alarte, Josep Silva, Salvador Tamarit.
JQUERY | INTRODUCTION. jQuery  Open source JavaScript library  Simplifies the interactions between  HTML document, or the Document Object Model (DOM),
 This presentation introduces the following: › 3 types of CSS › CSS syntax › CSS comments › CSS and color › The box model.
Parallel Applications Parallel Hardware Parallel Software IT industry (Silicon Valley) Users Efficient Parallel CKY Parsing on GPUs Youngmin Yi (University.
Cascading Style Sheets Orientation Learning Web Design: Chapter 11.
Client/browser productivity language Ras Bodik, Thibaud Hottelier, James Ide, and Doug Kimelman(IBM)
JavaScript Professor Robin Burke. 2 Outline Quiz Tables JavaScript.
Embedded Software SKKU 28 1 WebKit/EFL. Embedded Software SKKU 28 2 WebKit Parsing Layout and Painting WebKit and EFL Contents.
Scaling Charts with Design and GPUs Leo Meyerovich CEO of Graphistry.com | UC Berkeley 1.
Css. Definition Cascading style sheet (CSS)  It is a simple mechanism for adding style (e.g. fonts, colors, spacing) to Web documents.
Advanced Cascading Style Sheets (CSS) Lecture # July 2013.
Use CSS to Implement a Reusable Design Selecting a Dreamweaver CSS Starter Layout is the easiest way to create a page with a CSS layout You can access.
Review for exam 1 Midterm Closed Book. Review for Exam 1 Blackboard topic Review for exam 1 Sample Question Multiple Choice True / False Matching type.
INTRODUCTION TO CSS. TOPICS TO BE DISCUSSED……….  Introduction Introduction  Features of CSS Features of CSS  Creating Style Sheet Creating Style Sheet.
How the Web Works Building a Website – Lesson 1. How People Access the Web Browsers People access websites using software called a web browser. To view.
Rich Layout from First Principles Specification, Generation, and Parallelization Adam Jiang, Leo Meyerovich with Seth Fowler, John Ng, and RasBodik Hot.
Tutorial 4 Creating Special Effects with CSS. New Perspectives on HTML, XHTML, and XML, Comprehensive, 3rd Edition 2 Objectives Work with CSS selectors.
Tutorial 4 Creating Special Effects with CSS. New Perspectives on HTML, XHTML, and XML, Comprehensive, 3rd Edition 2 Objectives Work with CSS selectors.
Tutorial 4 Creating Special Effects with CSS. XP Objectives Work with CSS selectors Create styles for lists Create and apply class styles Create a rollover.
Positioning Objects with CSS and Tables
Holistic Twig Joins Optimal XML Pattern Matching Nicolas Bruno Columbia University Nick Koudas Divesh Srivastava AT&T Labs-Research SIGMOD 2002.
1 Holistic Twig Joins: Optimal XML Pattern Matching Nicolas Bruno, Nick Koudas, Divesh Srivastava ACM SIGMOD 2002 Presented by Jun-Ki Min.
1 The tree data structure Outline In this topic, we will cover: –Definition of a tree data structure and its components –Concepts of: Root, internal, and.
Web Design Terminology Unit 2 STEM. 1. Accessibility – a web page or site that address the users limitations or disabilities 2. Active server page (ASP)
IN THIS LESSON, WE WILL BECOME FAMILIAR WITH HTML AND BEGIN CREATING A WEB PAGE IN YOUR COMPUTER HTML – the foundation.
CSS Layout Cascading Style Sheets. Lesson Overview  In this lesson, we’ll cover:  Brief CSS review  Creating sections with the tag  Creating inline.
Microsoft Expression Web - Illustrated Unit A: Getting Started With Microsoft Expression Web.
1 Using jQuery JavaScript & jQuery the missing manual (Second Edition)
CSS Cascading Style Sheets Prepared By
OCR Computing OGAT Web Technologies. What OCR need you to know… You are expected to have a working knowledge of the above web languages.
Concepts for fluid layout
Based on Menu Information
Cascading Style Sheets - Building a stylesheet
TOPICS Chrome Dev Tools Process for Building a Static Website
Software Engineering for Internet Applications
IS 360 Understanding CSS Selectors
Working with Dynamic Content and Styles
Training & Development
Tutorial 4 Creating Special Effects with CSS
Cascading Style Sheets - Building a stylesheet
The Internet 10/20/11 CSS Layout
Concepts for fluid layout
Presentation transcript:

Targeted Bottleneck #1: Rule Matching EECS Electrical Engineering and Computer Sciences B ERKELEY P AR L AB Parallel Cascading Style Sheets Leo Meyerovich, Chan Siu Man, Chan Siu On, Ras Bodik {lmeyerov, siuman, siuon, P A R A L L E L C O M P U T I N G L A B O R A T O R Y Status Targeted Bottleneck #2: Layout The Solution Focus on parallelizing layout: later build outwards with langs & libs Parallelize layout bottleneck #1: rule matching Task-parallel design for embarrassingly parallel general case SIMD solution for common special case Parallelize layout bottleneck #2: layout solving Define semantics of CSS kernel to expose structure, dependencies Optimistically parallel solving informed by semantics The Problem Visual layout solving is a bottleneck for web browsers: Network improvements (ex: 3GLTE) make the software a bottleneck Layout slows initial response time Layout solving blocks subsequent JavaScript manipulations A common computational task on devices so a power concern Hard to Optimize: The specification is defined in English: dependencies are unclear Core parts are undefined and/or have competing implementations Flow-based layouts are intuitively modeled sequentially Sequential optimizations already in place (10-15 years of work) “Multiprocessors are no help to TeX“ -- Knuth What Happens When a Page Loads? document style XML rules parse XML normalize style tree rule match frame tree layout pixel image paint Normalize Rearrange XML document using tree rewrite rules to simplify layout Rule match For each XML document node, find and combine style rules matching it Layout Compute box size, position, color, font, etc. of document nodes Paint Convert tree of relatively positioned atomic content into a pixel grid Where Does the CPU Time Go? Templates style documents. Properties are batched inside rules. Rules are path predicates that may apply to multiple document nodes. CSS ::= (Rule ‘{‘ * ‘}’)* Rule ::= E [‘,’ E]* E ::= E 1 E 2 | E 1 ‘>’ E 2 | E 1 ‘+’ E 2 | L L ::= [ |... | ‘#’ ] (‘.’ )* … disjunction descendant child sibling node attributes Rule Matching Task Decomposition The basic sequential matching algorithm examines nodes individually. It simultaneously walks up from a node and backwards from a selector. A common optimization is to initially compact the tree into a trie. Conflicts between properties from rules are are broken using a total ordering on rules. We skip this now. At least two simple axis for decomposition for parallelism: 1.Partitioning the document tree 2.Partitioning the rules SIMD Parallelism Optimize the Common Case Trees are small and rules are quickly computed data partitions should be big or, dispatch, fast single node or small descendant chain common By expanding a tree into a table of paths, might be able to match multiple rules to a node, or vice versa. Possible Future Work People (UC Berkeley) End of current phase: understanding & modeling browser profiling CSS layout semantics sequential layout solving analyzing typical page sequential rule matching Next phase: experimentation parallel layout solver parallel rule matcher, SIMD rule matcher extending layout model preprocessing Exploit Pipeline Parallelism Initial load is dominated by parsing and processing, which can also be described well by a pipeline of attribute and tree rewrite grammars. Doing so, and combining with layout grammars, provides room for both local and global optimizations. Explore Memoization and Adaptivity Changes to layout often only have local impact; it is unclear how to factor this in with parallelism Parallel Extensions animation operators expose dependencies to a scripting runtime … Generalize the Solver It is unclear what types of constraints CSS solves; we want to generalize our solver Given style properties on nodes, information is propagated around the tree to yield sizes, colors, positions, etc. of nodes. Solving has convoluted and long dependencies 1.Tree-rewrite grammar to normalize 2.Attribute grammar for tentative widths 3.Attribute grammar for final widths 4.Attribute grammar for heights, positions … Proposing the First Semantics of CSS Layout Decomposition Every attribute grammar reveal 2-3 passes and thus a way to decompose based on tree structure 1.Downwards flows, forking on branches 2.Upwards flows, topological wavefront (joins) Optimistic Parallelism Semantics reveal and isolate unlikely sequential dependency inducing calculation threaded through the grammar. We can wrap these in futures and optimistically decompose ignoring them, recomputing later as needed. Leo Meyerovich Chan Siu Man Chan Siu OnRas Bodik Average from slashdot, wikipedia, digg Numbers from Firefox; Microsoft reports layout/matching = 40% in IE layout rule matching painting parsing, xml munging Average % of rule matches by selectors per rule (from 16 popular pages)