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

very slow #10

Open
Benraay opened this issue May 7, 2014 · 0 comments
Open

very slow #10

Benraay opened this issue May 7, 2014 · 0 comments

Comments

@Benraay
Copy link

Benraay commented May 7, 2014

Hi,

don't know where to put a comment it's not really an issue but I wanted to tell you my tests and experience maybe it can help.

First of all you have done a great work with vanilla.

The only problem i have is that its very slow compared to a basic method that consists to copy each property of an object directly

I have to manage 10000 values in a json array

with vanilla it takes 2200 milliseconds on average
the TranslationData has only two fields "value" and "key"
here is the code
var nb:int = jsonData.length;
var translations:Vector. = new Vector.;
var trData:TranslationData;
for(var i:int=0;i<nb;i++){
trData = new Vanilla().extract(jsonData[i], TranslationData);
translations.push(trData);
}

and copying directly takes 20 milliseconds on average
the TranslationData has only two fields "value" and "key"
here is the code

for(var i:int=0;i<nb;i++){
trData = new TranslationData();
trData.value = jsonData[i].value
trData.key = jsonData[i].key
translations.push(trData);
}

i hope it helps

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

1 participant