Way to read .mdl files with fast speed?

Hello,
I’m working on a project related to Matlab .mdl file. My project is about an MVC web application that can allow users to upload their .mdl file, then my system will read it and push it to database to visualize. I have tried many ways to read mdl file with the fastest speed possible, include use read line by line and real all file algorithm. But all of them take ~ 30s for 1000 lines mdl file and about 8 mins for ~4000 lines mdl file. When I tried if DiffPlug, it takes only 5 seconds to read 4000 lines mdl file, and it is so impossible. Can anyone give me some advice to read files faster? Thanks!

Can anyone give me some advice to read files faster?

Keep working on it for ten more years! :laughing: You can still download DiffPlug 0.4.1 from July 2012, I bet it runs about the same speed as yours does.

The closest thing to a “trick” is to get experience with a profiler, VisualVM is the one we used the most with DiffPlug. Find the slowest part, then make it faster. Rinse and repeat for ten years, and at the end of that process you’ll have something as fast as DiffPlug!

If you want a shortcut, you can use the parser and renderer which is built-in to DiffPlug under the following licenses:

  • for client-side applications, anyone with a DiffPlug license can use our API to make their own plugins for DiffPlug (including parsing and manipulating Simulink models)
  • for server-side applications, we offer per-tool-developer pricing (e.g. team of 1, team of 5, etc.)
  • for either case, we offer turnkey consulting where we deliver an initial app to your specifications for you, which you can maintain and modify from there

If you’d like to fast-forward your parser project to the end and start building tools, email us at sales@diffplug.com and we can discuss further.