Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
freeze can't make TypedArray or ArrayBuffer unobservable #9706
Steps to reproduce
Try to freeze a data element which is a TypedArray. Note if you remove the Object.freeze will work.
What is expected?
What is actually happening?
impossible to freeze
I am designing a visualization tool which needs to access large amounts of data. Eventually the data will be in flatbuffers (which are in ArrayBuffers); for the moment I am testing using a TypedArray. Although blocks of data may change, the contents of arrays will not. I need to prevent Vue from trying to create observers for content cells.
Note: in my test application the data is actually in Vuex -- however it is only when I access it to display a chunk that I run into a bottleneck, so I believe it is a Vue problem. However, I can open an issue on Vuex if that would be more appropriate.
Ok -- sorry... I thought it must have been that. When my data-getting function just calculates a dummy value and passes it back it works without delay. When I access the typed array, however, I see a big performance hit. (Could it be the use of a Getter from Vuex to get the data? I'll ask on stack overflow how to debug it.)