Giter Club home page Giter Club logo

javaserverfaces-4178's Introduction

JAVASERVERFACES-4178

this is a test webapp for facelet cache expiring check happening too often.

I used a modified Wildfly 10.0.0.Final to run the test app. Installed JSF 2.3.0-m06 (http://search.maven.org/remotecontent?filepath=org/glassfish/javax.faces/2.3.0-m06/javax.faces-2.3.0-m06.jar) following this method: http://stackoverflow.com/a/35901363/2911357

I'm using elipse debugger to run the manual test:

  1. setup an adeguate wildfly (or equivalent) in eclipse
  2. download/clone this repo and import the project in eclipse
  3. start wildfly in debug mode
  4. deploy the webapp
  5. with a browser go to: http://localhost:8080/JAVASERVERFACES-4178
  6. clear log
  7. refresh the page: around 4-10 lines like: ---------------------------------> opening connection!! ...
  8. clear log
  9. refresh the page (again): around 4-10 lines like: ---------------------------------> opening connection!! ...
  10. go take a coffe (wait some minute)
  11. refresh the page (again): around 200 lines like: ---------------------------------> opening connection!! ...

this is a proof that:

  • Util.getLastModified(url) is called unnecessarily many times in a row (it's a time consuming op)
  • incrementing the threshold is conceptually wrong and leads to this kind of effect

Note that this is a simple page with 100 composite component instance of the same type. In an average high-level management app, the size could easily be around 5000.

I added a custom facelet cache implementation.

To enable it, just uncomment the line from faces-config.xml

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.