jhipster / generator-jhipster

JHipster is a development platform to quickly generate, develop, & deploy modern web applications & microservice architectures.
https://www.jhipster.tech
Apache License 2.0
21.45k stars 4.02k forks source link

Faster home page loading. #9219

Closed MInesGomes closed 5 years ago

MInesGomes commented 5 years ago

To access the same database in the same server with php is like 0 seconds to appear the home page and with Jhipster is 12 seconds.

You can check here php -0 seconds jHipster - 12 seconds without no indication (In chrome shows the loading icon, but in safari nothing)

Beter experience User Interface, Maybe with Lazy Loading?

gmarziou commented 5 years ago

First page loading can be faster for sure but you are comparing a simple static HTML page without any JS code with a Single Page Application, it's like comparing apples with oranges.

Also your JHipster app has issues:

So before measuring performance, make sure you deploy a prod build.

I'm closing the issue as it's clearly a user misunderstanding.

atomfrede commented 5 years ago

@Entrecampos :warning: Please change the default passwords too! Not sure if that is real data...

deepu105 commented 5 years ago

Some of the data looks real, please change default passowrds or delete those data

Thanks & Regards, Deepu

On Fri, Feb 8, 2019 at 11:59 AM Frederik Hahne notifications@github.com wrote:

@Entrecampos https://github.com/Entrecampos ⚠️ Please change the default passwords too! Not sure if that is real data...

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/jhipster/generator-jhipster/issues/9219#issuecomment-461766770, or mute the thread https://github.com/notifications/unsubscribe-auth/ABDlF3xLce86YhVCN7G4RqyRI1ArW3rTks5vLVisgaJpZM4auOuz .

MInesGomes commented 5 years ago

Thanks @gmarziou.

They are not real data, I din't change yet the default pwd, so you can test it better. Do you think if optimise my build for production would be faster? My Suggestion was if is possible same lazy loading, so the first page appear faster and why on safari doesn't appear loading icon?

atomfrede commented 5 years ago

The optimised production build is much much smaller. Now the bundle is 17(!) MB. And in the latest version we should have lazy loading for entities. If you are brave enough try the vue.js blueprint currently in beta.

MInesGomes commented 5 years ago

Thanks @atomfrede. Until now I was just trying Jhipster for (generating the database and use the crud API, and some extra that I build) to implement an Ionic 3/Jhipster that is already installed in my android. And other person was doing the portal in php. Now there is an idea of doing only in jhipster the Portal. but when I saw so slow ... I was not sure if it was a good option. I am brave :-) that sounds a great idea. Is this https://github.com/jhipster/jhipster-vuejs ? Any more tips?

sahbi-ktifa commented 5 years ago

This is the one. Just follow up the guidelines there and you should have much better performances even using dev mode.

MInesGomes commented 5 years ago

Thanks a lot @sahbi-ktifa & @atomfrede. Vue seems great! Still ... Ionic is maybe more organised ... 1 file for .ts; 1 html and 1 for css all in 1 folder... With Vue I get the idea that is all in one file? https://stackshare.io/stackups/ionic-vs-react-native-vs-vue-native https://blog.ionicframework.com/a-vue-from-ionic/

gmarziou commented 5 years ago

@Entrecampos if you're building an API backend in JHipster for an Ionic mobile app then the time to load the web app is not relevant at all because it will call REST API in JSON and will not download the frontend part (HTML/CSS/JS)

MInesGomes commented 5 years ago

Thanks @gmarziou. Yes until now was not important. But now maybe could be an option to build the portal in Jhipster instead of php. And I am deciding between Vue or Ionic PWA or Jhipster- Angular slow :-)

Any suggestions?

gmarziou commented 5 years ago

As others said, prod build will be much faster whatever framework you use (Angular, React or Vue) and don't forget also that the browser caches everything on first load.

gmarziou commented 5 years ago

It depends on whether you want to keep the UI generated by JHipster or not, it could work for an administration portal and you could build a distinct end user web app or mobile app from scratch just consuming the API exposed by JHipster.

gmarziou commented 5 years ago

As a side note, I saw "If the mail server is not yet instaled, you can see the link to change password in /opt/tomcat/logs/catalina.out", any reason why you deploy in Tomcat? This is so much harder than using the executable war/jar, stackoverflow is full of questions from users who use Tomcat for JHipster apps :)

MInesGomes commented 5 years ago

Great tip @gmarziou !!! It has been a hard experience with tomcat.

I also have to configure TLS. I installed Nginx. And try to figure out how to do it and if is necessary??. All suggestions in this area are very welcome, because don't know much of this stuff :-)

MInesGomes commented 5 years ago

The client likes the UI generated by JHipster. But I find it slow in dev. I can try in prod executing the war .... was giving errors with tomcat ... So I change to dev most of the configurations. :-)

gmarziou commented 5 years ago

Well, get rid of Tomcat and use a prod build as an executable war. This how it is supposed to be used.

MInesGomes commented 5 years ago

Yes!!! No Tomcat & Prod mode! Quite good the speed :-) Thanks @gmarziou !

gmarziou commented 5 years ago

Great! Did you decide also about which frontend framework?

MInesGomes commented 5 years ago

Like now is faster and the client still wants lot of changes I will stay for now with 'out of the box' jHipster/ angular :-)

But If I had to choose I would go for Ionic. And works very well JHipster entity generator for ionic :-) https://github.com/oktadeveloper/ionic-jhipster-starter

Now is still for ionic 3 so don't forget to npm install -g ionic@latest-3