-
Notifications
You must be signed in to change notification settings - Fork 250
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
Change serialization #2525
Change serialization #2525
Conversation
Edit: Looking further has shown that we actually are not using any non serializable type in processes, so JSON.stringify / parse are enough to handle it. Based on this, I removed unit tests which were testing functionalities/cases which were not used in our code base. TODO:
|
Thanks for taking a look at our serialization. Using module.exports = {
karma: {
config: {
proxyReq: function(proxyReq, req, res, options) {
proxyReq.setHeader('Referer', 'https://www.example.com/');
},
client: {
mocha: {
grep: /fooComponent.*/
}
}
}
}
} See https://karma-runner.github.io/5.2/config/configuration-file.html. The same goes for other test runners. This is sort of a hidden feature, so we might be able to get rid of this feature (obviously our e2e tests don't have anything like this). However, I feel like we might regret removing this at some point in the future. We could also opt for using |
Uhh.... could we try at least making this as an option? Like making option: {
'files': ...,
'testRunner': ...,
'advanced': {
'serialization': true/false
}
} and just making: For now I would really like to see the difference in performance between these 2 solutions, and then we could see if we even need this or advanced serialization. To sum up: Closing for now. Ill wait for flamegraph (either made by me or Latikna), and then we can have debate if there is a need for adding more options :) |
Yes. It's more to improve maintenance than improve performance 🤷♂️ |
I was looking at the interfaces and I think we could use JSON.stringify instead of serialize. E2E tests pass. Unit won't for now since we are testing
File
. Although I think it is possible to solve it too. Since the only place it can occur is "CallMessage" in args (its any type), so we could just map through args, find if there is File instance, serialize it, and JSON.stringify entire object.Deserialization would be opposite, JSON.parse and then map serialize on args