Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
Welcome, and the "devrant" tag is only for stuff related to this platform itself. "Developer rants" are just "rant" because there's no non-devs ranting.
-
@punsa The category should have been "rant", not "devrant".
The point is that you can filter rants by category, and if I want to check whether there's some news on devRant itself (e.g. new features), I can filter for posts with tag "devrant". That doesn't work anymore if people mistag their rants with "devrant". -
Split your application into multiple modules, then the initial page load is not that big.
-
Not automagically, but grep can help (sed/awk as well, if you want to go deeper).
Scan for ts files containing import:
grep -r --include \*.ts ^import\* ^import
It's automate-able over a set of packages as well, the second step conceptually would be to eliminate packages one by one. The following command will print number of matches scanning for a particular pattern:
grep -r --include \*.ts ^import\* . | grep -c BrowserModule
From there, remove a package, rebuild, test, rinse, repeat.
Also seriously consider upgrading, as the new versions are a better development experience, and aid in mitigating this to an extent with better import management and some tree-ish shaking. The eventual holy grail of Ivy also promises more code path shaking, so it'll prepare for that as well. -
@punsa And the website itself has literally huge issues. gtmetrix.com confirms the terrible loading time of 12.8s. While 2.69 MB in transfer and 69 requests is already heavy, that in itself doesn't explain the loading time.
Looking into the waterfall, that's why: 917 kB of markup and 530 kB in stylesheets - that's easily TEN TIMES of what it should be! But that's still nothing compared to the batshit crazy 7.8 MB in JavaScript, on a page that should by and large not even need much JS.
You know you have a problem when even counting the gzip compressed transfer, you have FIVE TIMES more script data than image data on a real estate page. -
punsa45y@SortOfTested Thanks a lot, I guess this will be helpful, I will try this out and will update!
-
@punsa Also, your server is not configured properly - it uses HTTP/1.1 instead of HTTP/2, so that adds additional handshake delays especially for the https version, and even worse on mobile. That's the very first thing I'd fix because it should be quick and easy. Also, the expires headers for browser caching on static resources.
As for the framework, I'd question whether you even need a client-side framework. Maybe I don't get the underlying point, but the page doesn't look as if it even needs much scripting?
And you certainly don't need Bootstrap because CSS frameworks are a bad idea to begin with. -
punsa45y@Fast-Nop Okay thanks for server configuration, I will check that and fix that first.
Talking about client side, this is classified portal, and it is going to be huge, lot of dyanamic links, which will be using same set of components once created. So thats why I picked angular framework, else I could have done pure MVC approach.
Before starting this, I did a check on competitors websites. Few of them are - housing.com, commonfloor.com, magickbricks.com etc.
If you think MVC approach would be better, can you tell me considerable points which I can keep in my mind to think of that in future. It would be very difficuilt right now to incorporate that,as it would require lot of changes, and we are primarily focusing ok business, but we need to give good user experience which will boost us for SEO.
I am working on my website getmeroof.com, and I am using Angular 5. I have used many different packages due to which vendor size is too big now, now Is there any good way to figure out which library or package I am not using, because going through each and every file is taking too much time, any help?
devrant