Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

StringBuilder is very slow #177

Open
neuronsupport opened this issue May 5, 2017 · 6 comments
Open

StringBuilder is very slow #177

neuronsupport opened this issue May 5, 2017 · 6 comments

Comments

@neuronsupport
Copy link

For string concatenation which is faster with Dragome? StringBuilder does not seem to be fast. It uses array and uses array push for append. Is concat method of String faster? what do you recommend?

@neuronsupport
Copy link
Author

StringBuilder uses array for concatenation. This is very slow. GWT uses plain javascript strings with StringBuilder. I would recommend taking the GWT approach instead of array.

@neuronsupport
Copy link
Author

@neuronsupport neuronsupport changed the title [Question] String or StringBuilder StringBuilder is very slow May 7, 2017
@neuronsupport
Copy link
Author

"ScriptHelper.eval*", is this really javascript eval? Or dragome creates raw javascript method for it?

@fpetrola
Copy link
Collaborator

fpetrola commented May 8, 2017

Hi @norzak sorry for the delay, ScriptHelper in general creates raw js for eval, but in some particular cases, for example when you are not using a constant string as parameter it uses eval.

@fpetrola
Copy link
Collaborator

fpetrola commented May 8, 2017

It seems it could easy to use gwt implementation: https://github.com/gwtproject/gwt/blob/master/user/super/com/google/gwt/emul/java/lang/StringBuilder.java
We can try it

@neuronsupport
Copy link
Author

Great. I agree.

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

No branches or pull requests

2 participants