tern.java icon indicating copy to clipboard operation
tern.java copied to clipboard

Implement tern server with Nashorn

Open paulvi opened this issue 11 years ago • 6 comments

try and write results here

paulvi avatar Mar 28 '14 09:03 paulvi

Please not that some tern plugins like closure, node.js depends on node.js for some features. Ex tern plugin node uses node to resolver module name declared inside require because it needs file system API)

angelozerr avatar Dec 08 '14 08:12 angelozerr

@mickaelistria @vrubezhny @dgolovin @maxandersen @PaulVI @fbricon @piotrtomiak I have implemented quickly tern server with Nashorn (but not the integration with Eclipse IDE).

You can find info at (samples to launch, etc) https://github.com/angelozerr/tern.java/blob/master/core/tern.server.nashorn/README.md

But I'm very disappointed, because I find the load of tern server is very slowly with Nashorn compared to Node.js or J2V8. Completion with big files with Nashorn is very slow -(

Perhaps my integration is not very performant?

angelozerr avatar Nov 06 '15 17:11 angelozerr

At least, this is real world example for now.

BTW, https://github.com/angelozerr/tern.java/blob/master/README.md needs to be updated, it is not only idea now...

Showing that there's choice.

paulvi avatar Nov 07 '15 18:11 paulvi

BTW, https://github.com/angelozerr/tern.java/blob/master/README.md needs to be updated, it is not only idea now...

done

angelozerr avatar Nov 07 '15 23:11 angelozerr

Perhaps my integration is not very performant?

No, it's not your fault ;) In the early days of adopting Tern in MyEclipse we've checked performance comparisons of Nashorn, Rhino and V8 (both Node.js and J2V8 are based on V8) and it looked like Nashorn is only slightly better than Rhino, and Rhino is pretty slow with Tern.

piotrtomiak avatar Nov 09 '15 12:11 piotrtomiak

Thanks @piotrtomiak for your feedback. Yes today node > J2V8 > Nashorn > Rhino.

When you will have tipe, could you answer me for https://github.com/angelozerr/tern.java/issues/363 with WebSocket topic. I have started to implement WebSocket on server/client side with Jetty (for the moment tern server send a message to the Java client and I display the result in the console). Any feedback are welcome. thanks!

angelozerr avatar Nov 10 '15 09:11 angelozerr