• Share
  • Email
  • Embed
  • Like
  • Save
  • Private Content
Performance for Product Developers
 

Performance for Product Developers

on

  • 980 views

 

Statistics

Views

Total Views
980
Views on SlideShare
922
Embed Views
58

Actions

Likes
1
Downloads
13
Comments
0

3 Embeds 58

http://www23.jimdo.com 28
http://afmn.jimdo.com 28
http://www.linkedin.com 2

Accessibility

Categories

Upload Details

Uploaded via as Adobe PDF

Usage Rights

CC Attribution License

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

    Performance for Product Developers Performance for Product Developers Presentation Transcript

    • Performance for Product Developers Matthew WilkesFriday, 12 October 12 1
    • Who am I? • Performance and security work at the Code Distillery • Framework and security teams, membership committee • Foundation board memberFriday, 12 October 12 2
    • Who am I? • Zope / Plone core developer • Silly accent. Sorry. • Not a morning person. Sorry.Friday, 12 October 12 3
    • Performance… • Plone is pretty damn fast • Low edit sites are really easy to make fly • Runs fine on a 256mb VMFriday, 12 October 12 4
    • Performance… • plone.app.caching takes about 5 minutes to configure • Add Varnish and it goes really rather quick • Writing is harderFriday, 12 October 12 5
    • Performance…Friday, 12 October 12 6
    • … for Product Developers?Friday, 12 October 12 7
    • … for Product Developers • Security isn’t the sole responsibility of the integrator • Neither is performance • Everyone is careful about the code they writeFriday, 12 October 12 8
    • some even over do itFriday, 12 October 12 9
    • Recap • Don’t add things to the catalog if you can help it • If you have to, use an indexer, not just a raw FieldIndexFriday, 12 October 12 10
    • Recap • Build your types on Dexterity, not Archetypes • If you’re not sure what structure to use for your data, the answer is OOBTreeFriday, 12 October 12 11
    • Recap • Avoid big object churn by keeping Lengths of things you need • Find a balance between huge objects and annotation soupFriday, 12 October 12 12
    • Recap • If you see for loops inside for loops you’re probably missing a simpler way • Don’t forget sets and itertools, they’re goodFriday, 12 October 12 13
    • … for Product Developers • Very few people are using the tools we have available • Equally true for publicly available products as for policiesFriday, 12 October 12 14
    • Who’s used this?Friday, 12 October 12 15
    • You guys! Seriously‽Friday, 12 October 12 16
    • Access time for a browser view through Varnish 80ms 23 60ms 56 processing connect 40ms 20ms 0ms 0 without cache:ruleset with cache:ruleset I love this chartFriday, 12 October 12 17
    • plone.app.caching • Assign caching rules directly to contexts by interface • Can map to an operation, like plone.app.caching.strongCaching • or to a ruleset, like plone.content.itemViewFriday, 12 October 12 18
    • psst, integrators! • You can have commit access today • If your favourite product doesn’t have rulesets defined, add them • I’ll bring “I cleaned up your mess” stickers to BrasíliaFriday, 12 October 12 19
    • Edge Side Includes photo (c) http://www.flickr.com/photos/fornal/Friday, 12 October 12 20
    • ESIs • Varnish is your friend • Lets integrators do page composition • but easy to leak dataFriday, 12 October 12 21
    • Friday, 12 October 12 22
    • ESI • Suddenly, cache hits for logged in users! • aaaand, cache hits on private pages for anonymous • Really rather badFriday, 12 October 12 23
    • ESI • Set ETags to roles|lastModified? • ETags can be faked • Still leaks dataFriday, 12 October 12 24
    • ESI • Integrators will still have to segment their cache manually • Hard work • A lot easier if add-ons are written with this in mindFriday, 12 October 12 25
    • ESI • Plan your templates for eventual ESIs • Many small templates is appropriate, lets them be customisedFriday, 12 October 12 26
    • ESI • If there is a block of markup that is mostly static but uses the user in some bit, make sure that’s separated out • Integrators shouldn’t need more than a few minutes to add ESI to your templatesFriday, 12 October 12 27
    • Testing caching photo (c) http://www.flickr.com/photos/alisdair/Friday, 12 October 12 28
    • Testing • Far too few people run automated tests on their caching • Well, far too few people run automated tests at allFriday, 12 October 12 29
    • Testing • If you have plone.app.testing based tests already it’s easyish • Create a new layer using a ZServer and start up Varnish • Make some testbrowser callsFriday, 12 October 12 30
    • Things that need buildingFriday, 12 October 12 31
    • Utility packages • We need helper classes and methods for writing caching tests • Actual tests in popular packages, as examplesFriday, 12 October 12 32
    • Rulesets • The current plone.app.caching rulesets are integrator focused • We need some standard ones for product developers to useFriday, 12 October 12 33
    • The Code Distillery Bristol Questions? Want help putting this into practice? sales@thedistillery.euFriday, 12 October 12 34