I have realized that i have learnt too many new technologies, and looking at the graph, i don’t know why i need to use the firebase, as i need to jump to WebSocket (i cannot avoid it - previously i was worried about the resources). It needs some Mqtt, to reconnect, what i need to dig into, but anyway it’s far more easier, that the firebase stuff, so i will eliminate lot of code. My worry was that Websocket needs some resources, and might drain battery with a new TCP connection, but i need real time communication now, and the FCM is not really useful on that one, so the notification itself can pass through on the websocket stuff. At least i remove the 20% of my project size. Anyway Google aknowledged my issues.
I have reported just 5 to Google. Chrome team is lazy, but the Android Studio team just prioritized P1, S1 and P1, S2 to my bugs. So i’m not that idiot what i look like.
One of the Google Chrome bug is, that when you inspect your device and the laptop hasn’t any network connection, it will show an empty page, no errors on the inspector tool. The other one was hard to fix, so they just closed them.
I tried to persuade the Angular team to help the ionic team a little bit in the configuration, because they think that the ionic blank project has been messed up, it shouldn’t contain any compiler, it’s coming from the platformDynamic, instead of that they need to use AOT. (The blank project contains Angular 5, so i think it might be some negligence)
Anyway i’m on the right track now, to eliminate the ionic stuff. My own codebase will be drastically shrinking with my channel stuff. (each UI element on my page is subscribing to some channel, and instead of using eventemitter, i’m broadcasting, or independently send messages - my channel mechanism 30 lines simple javascript callback,which is far more efficient than the RxJS stuff)
As i need to write some native stuff to IOS and Android, which is the next phase of my project (i already investigated how i can do it, and i have learnt swift also, i’m a master in java), it will be easy, as i’m using some official library from Google, what i cannot really avoid, i very likely won’t use the cordova stuff.
I also realized that the uglify plugin can be configured a little bit better in Ionic, i was able to slash 5%.
(you can go to angular-cli and make an ng eject --prod, so you can look at their webpack configuration)
Other one is that there is a webpack plugin where you can add prod and dev variable to your code, i messed up that part, and now i learnt from ng, how it should have been done. I missed that part form ionic.
Other thing is, that uglify is not that efficient what i thought, the code contains some readable part also on Enumeration and some stuff (readable function and class names). Some other classes and functions are totally unreadable, so i think it’s some sort of bug in the uglify, or some thing, what they cannot resolve. If i’m counting the unresolved stuff, i think there is a 20-30% room for improvement on that one also.
You can also improve some stuff, if you jump to pbf http instead of json http.