Web performance

425 views

Published on

what's thing we should think about during the performance journey . Major help you to solve these problem .

Published in: Technology
  • Be the first to comment

  • Be the first to like this

Web performance

  1. 1. Web PerformanceOptimization<br />
  2. 2. Agenda<br />What?<br />Why?<br />How?<br />
  3. 3. What does it looks like? <br />What? <br />
  4. 4. Long and Hard Journey<br />
  5. 5. Q: what’s the trip destination?<br />Palo Alto ?<br />CDC ?<br />Sweden? <br />Indian ? <br />
  6. 6. Why?<br />
  7. 7. Language Level<br />Most compilers in most programmer<br /> languages does these optimizations<br /> for you, but not JavaScript. <br />
  8. 8. Structure Level<br />Requirement and Design change, some<br />time need restructure and redesign our<br />Program .<br />
  9. 9. Coding Level<br />Developer skills are difference, implement<br />ways are different, but just one way is the <br />best.<br />
  10. 10. The most Important one:<br />Improve User Experience, make user happy.<br />
  11. 11. How?<br />
  12. 12. Structure meet the requirement <br />Suggestion: <br /> When we design the structure , we should think about the data size, if the at the beginning of the project, the spec could provide some information of data size we should support, like min / max data size, that <br /> could help us more.<br />
  13. 13. Correctness First<br />Correctness First, then do optimize<br />Test Performance early(when coding, don’t forget the performance)<br />More Testing (Different Browser IE8, FF3/4)<br />
  14. 14. When server response slow, what’s the first thing we think about?<br />Server Slow?<br />Request parameters too much?<br />varobjParams = { <br />ids: cb.args()[0], <br />paramQueryParams: { <br />retrieveParamGroups: true, <br />retrieveParams: true, <br />objGroupQueryParams: { retrieveObjectGroups: true, <br />retrieveObjectGroupMembers: true <br />} }, <br />retrieveTags: true };<br />
  15. 15. Suitable Operation Interfacewith Back-end<br />
  16. 16. Why big data at one time? <br />
  17. 17. Back-end<br />Front-end<br />Data size <br />response<br />Request<br />1<br />2<br />
  18. 18. If necessary , don’t forget using XSLT process big XML data <br />
  19. 19. Don't Optimize Without Measuring<br />
  20. 20. A<br />B<br />C<br />D<br />Only speed up things that take a lot of time.<br />
  21. 21. Avoid unnecessary repaint<br />
  22. 22. TODO<br />
  23. 23. Code Quality<br />High quality code is mostly likely to avoid platform problems.<br />Code Conventions for the JavaScript Programming Language<br />http://javascript.crockford.com/code.html<br />Use JSLint.com. Pass with no warnings.<br />Coder refractor<br /> (https://github.com/kangax/kratko.js) <br />
  24. 24. Have regular code readings.<br />Don’t wait until release to do code reviews.<br />Do team code reading regularly during development.<br />Experienced developers can lead by example.<br />Novice developers learn from the group.<br />Problems can be discovered early.<br />Good techniques can be shared early.<br />
  25. 25. Questions?<br /> What’s the destination of our<br /> long and hard journey?<br />
  26. 26. About Author<br />Name: Major<br />Email: major.yezhouquan@gmail.com<br />City: Beijing / China<br />
  27. 27. Thanks<br />

×