We have moved data-parsoid to data.parsoid on the DOM and save that data at the end of DOM postprocessing. Other attributes like data-mw are currently handled manually.
It would probably be both faster and more convenient to use data.* for those attributes as well. The necessary support for loading and saving them is mostly implemented in loadDataAttrib (missing: loadDataAttribs) and saveDataAttribs. With the exception of data-parsoid, we should only load data attributes that are actually defined by default.