Skip to content
This repository has been archived by the owner on Jun 8, 2021. It is now read-only.

Rendering takes too long #27

Closed
RadouaneRoufid opened this issue Sep 18, 2018 · 6 comments
Closed

Rendering takes too long #27

RadouaneRoufid opened this issue Sep 18, 2018 · 6 comments

Comments

@RadouaneRoufid
Copy link

Hi,

I would like to start with great thanks for your wonderful work.

I have a angular app with a Spring boot backend. I use your solution to implement SSR. The solution works great, but the first load takes about 1 minute. I don't really understand why.

On server start up, I have the following warning ;

Java HotSpot(TM) 64-Bit Server VM warning: You have loaded library /home/me/libj2v8_linux_x86_64.so which might have disabled stack guard. The VM will try to fix the stack guard now.
It's highly recommended that you fix the library with 'execstack -c <libfile>', or link it with '-z noexecstack'.

And the following logs when I try to reach "/".

[Error]
ERROR [Error]
ERROR [Error]

Any explanation of why my rendering takes too long ?

Thank you.

@swaechter
Copy link
Owner

swaechter commented Sep 19, 2018

Hey Radouane

The very first time the J2V8 render is started, it will download the J2V8 DLL and place it in your home directory - after that it will just look for the DLL and use it. Is this DLL somehow deleted from time to time, e.g. anti virus software?

If not, can you share a reproducible example (Git repo) + information about your system (OS etc) so I can try to reproduce the problem?

Best,
Simon

@RadouaneRoufid
Copy link
Author

Thank you. I will check that and share a reproducible repo.

@RadouaneRoufid
Copy link
Author

A simple angular app works fine with ssr. I will try to add some complexity to reproduce my problem.

@RadouaneRoufid
Copy link
Author

The problem was due to ifvisible. Putting it likle below solved the issue :


 if (isPlatformBrowser(this.platformId)) {
            ifvisible.on('wakeup', () => {
                this.countConversation();
            });
        }

@swaechter
Copy link
Owner

Yeah that make sense, because the "screen visible" event will never occur. But still it's strange that registering the listener works at all (Because there is no client DOM)

@RadouaneRoufid
Copy link
Author

I'm using domino to fake DOM. It can explain why the listener worked.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants