No video

How to use compression in Nodejs to make it faster and smaller by at least 10 times.

  Рет қаралды 32,059

Mafia Codes

Mafia Codes

Күн бұрын

In this video you will learn how to make a #nodejs #express application fast by using #gzip #compression in responses.
⭐ Kite is a free AI-powered coding assistant that will help you code faster and smarter. The Kite plugin integrates with all the top editors and IDEs to give you smart completions and documentation while you’re typing. I've been using Kite for 6 months and I love it! www.kite.com/g...
FREE $100 credit @Digital Ocean: m.do.co/c/3208...
Subscribe: www.youtube.co...
Support the channel:
Paypal: www.paypal.me/...
Patreon: / trulymittal
---------------
Other useful Playlists
---------------
#RestAPI (#NodeJS and MongoDB): • REST API using NodeJS ...
#API Authentication using #JWT: • NodeJS API Authenticat...
#Firebase: • Firebase | Build a Not...
Docker: • Docker
MongoDB: • Learn MongoDB in 50 mi...
Html/Css/Js: • HTML / CSS / JS
Android: • Android
Challenges: • Challenges
---------------
What I use
---------------
Mouse: amzn.to/2O9RJtu
Keyboard: amzn.to/2qxajCU
Keyboard 2: amzn.to/2XDWH4X
Monitor: amzn.to/2pDg7dH
Processor: amzn.to/347WWIb
RAM: amzn.to/2QEkUqw
Graphics: amzn.to/33aBrF4
Microphone: amzn.to/2DabdI9
#StayHome #WithMe #yoursTRULY #tutorial #howto #android

Пікірлер: 59
@rightangleoverseas2391
@rightangleoverseas2391 3 жыл бұрын
Can't thank you enough for all the production grade development knowledge that you're sharing with us. Every developer should watch this. Your channel is so underrated. Thank you !
@mafiacodes
@mafiacodes 3 жыл бұрын
Thank you so much ☺️, spread the word/work. Subscribe like share
@rightangleoverseas2391
@rightangleoverseas2391 3 жыл бұрын
@@mafiacodes Most certainly, thank you
@AvinashKumar-jo8ql
@AvinashKumar-jo8ql 2 жыл бұрын
Agree. He is sharing premium content.
@andersondantas2010
@andersondantas2010 3 жыл бұрын
Just keep in mind that real-life data might not be a string repeated 1000 times which will result in you having a result not as good as those from the video. Although, it is really useful and can speed up your web pages, you may get about 2 to 10 times compression from real HTML/CSS/JSON and any other text format instead of the 100s of times from the video.
@nexgenua
@nexgenua 11 ай бұрын
Also, if the data is large and there are a lot of requests, it can lead to blocking of the thread, as javascript is single-threaded
@sebastianjulonchamana2987
@sebastianjulonchamana2987 9 ай бұрын
@@nexgenua basically you need a lot of memory to handle it, for the server we're using is working from 128mb request to 3.9mb that's actually savage
@smnomad9276
@smnomad9276 2 жыл бұрын
Just discovered your channel and your programming level is one of the highest on youtube 🔥 Please keep posting more videos you deserve 100k followers at least ❤️ Can you please do a video on Node js multithreading and worker threads, and how we can combine them with javascript web workers + this compression method to give us the lightest and fastest node js app possible ?? I think that video would make a lot of noise in the javascript community making nodejs as fast as Go for example for backend or faster!
@ahlambeyoud1709
@ahlambeyoud1709 3 жыл бұрын
Thank you very much, you are truly one of the best programmer youtubers 👍 I have learned so much from your channel, very clear explanation, keep up your great work 😁
@mafiacodes
@mafiacodes 3 жыл бұрын
Thanks for the compliments
@tambolaking5383
@tambolaking5383 4 жыл бұрын
Superb video. Love such useful and less explored content. Improves my development so much.
@ramiworkstation
@ramiworkstation 26 күн бұрын
Thank you thousand times ❤️
@raymondmichael4987
@raymondmichael4987 4 жыл бұрын
These short videos are really great brother. Can you explain how to first download image in low quality when page during low network, and download full image later
@mafiacodes
@mafiacodes 4 жыл бұрын
Ok I will try
@sangeetashetty8542
@sangeetashetty8542 Жыл бұрын
Helpfull content. Clear Explaination
@AvinashKumar-jo8ql
@AvinashKumar-jo8ql 2 жыл бұрын
Any reference for media(audio/video/image) compression on client-side in react js would be helpful.
@GabrielMartinez-ez9ue
@GabrielMartinez-ez9ue 3 жыл бұрын
Thank you!
@Tony.Nguyen137
@Tony.Nguyen137 6 ай бұрын
@2:47 where does the red text “269,6k (gzipped: 62,9k)” comes from??
@chandannelson
@chandannelson Жыл бұрын
Nice
@Tony.Nguyen137
@Tony.Nguyen137 6 ай бұрын
Normally I send a html template with css js file in the response, will the html js css files be compressed?
@AnandGiri
@AnandGiri 2 жыл бұрын
good job
@ramonpaolomaran2253
@ramonpaolomaran2253 2 жыл бұрын
compression is not working in my project I not see its working... I have the same size in front-end response using express.js : (
@saisankarmadeti4736
@saisankarmadeti4736 20 күн бұрын
The same is happening with me, you got any solution?
@shivpratap5183
@shivpratap5183 3 жыл бұрын
thanks bro.
@botbot533
@botbot533 2 жыл бұрын
Can we use it for request header as well? In my case, on localhost it works, but once deployed to ingress, it throws 431. I use a large string in request header.
@AKASH-sw9bs
@AKASH-sw9bs Жыл бұрын
Brother this doesn't work good with JSON format (230kb is compressed down to 219kb only) . The only solution i think i will go with is grpc for saving bandwidth in my future projects.
@sidharthbhunia2026
@sidharthbhunia2026 4 жыл бұрын
Hie sir please reply I tried this thing with static files like photo I stored them in public directory and then made express static as middleware The thing is that I checked with postman that those static files don't have that content encoding gzip Also on browser the transfer size is same Please reply sir thanku in advance
@mafiacodes
@mafiacodes 4 жыл бұрын
Try hard refresh and see if it work’s
@sidharthbhunia2026
@sidharthbhunia2026 4 жыл бұрын
No sir in web browser when I send any text kinda thing that u have show its working perfectly no problem there but when I am accessing a static file like making a directory public and then using express making it public now when I use that link for suppose a picture it's coming but the transfer size and actual size is same(using Mozilla browser) and when I watched the response header it didn't have that content encoding as gzip Sir I tried stack over flow and Google out stuffs but I didn't found anything please once u try that thing please sir Edit:- even for json data it is working awesome sir the thing is static files sir
@hardikmistry1661
@hardikmistry1661 2 жыл бұрын
@@sidharthbhunia2026 gzip and other compresion are work on text base data sharing. you can see that by using google developer speed test runner they say you have to do it for text base data sharing. i also have same question like you have made this comment 1 year so share with me please if you have find some other way to compress image and media type data. thans in advance.
@pratika-prakhar
@pratika-prakhar 2 жыл бұрын
If we use compression then what about response time, will it reduce the performance?
@hardikmistry1661
@hardikmistry1661 2 жыл бұрын
no may be if you use google developer speed test they will tell you to do compresion on text base data sending so that mean crome browser decrypt by it self as gzip. it is made by headers present in responce.
@nexgenua
@nexgenua 11 ай бұрын
@@hardikmistry1661 He meant that the server, archiving data, spends a lot of resources and at this time will not be able to serve other requests
@ivan86478
@ivan86478 Жыл бұрын
Do hoy know how to import if imán using type module on json configuration ?
@emeetv
@emeetv 4 жыл бұрын
Is there any disadvantages of using this? Or will it be OK to use it on production
@mafiacodes
@mafiacodes 4 жыл бұрын
Not at all u can use it 💯
@emeetv
@emeetv 4 жыл бұрын
@@mafiacodes thank you so much.. Appreciate your kind work.. Hope you upload such a good content frequently. Well wishes
@koora-gool03
@koora-gool03 2 жыл бұрын
Hi sir i need your help to dycrpted content for a link please can you?
@technoinfoworldwide2329
@technoinfoworldwide2329 3 жыл бұрын
how did you use rocket symbol in console.log()?
@mafiacodes
@mafiacodes 3 жыл бұрын
its an emoji, u can add that using the keyboard
@amanali9501
@amanali9501 3 жыл бұрын
It's not working in windows CMD or prayer
@amanali9501
@amanali9501 3 жыл бұрын
Or powershell
@arinzechukwuhillary0zor644
@arinzechukwuhillary0zor644 2 жыл бұрын
please can you do that of react js
@gmmkeshav
@gmmkeshav Жыл бұрын
How the hell there is no difference in viewing after compression.
@balajih2214
@balajih2214 4 жыл бұрын
Is image quality will reduce when use this dependency
@mafiacodes
@mafiacodes 4 жыл бұрын
No
@balajih2214
@balajih2214 4 жыл бұрын
@@mafiacodesThankyou
@amanali9501
@amanali9501 3 жыл бұрын
How to getting that comment type near required comprehensive i.e. 62.45kb
@mafiacodes
@mafiacodes 3 жыл бұрын
Vscode extension: import cost
@vijayarajan-bt5fk
@vijayarajan-bt5fk Жыл бұрын
Woooooooww
@sidharthbhunia2026
@sidharthbhunia2026 4 жыл бұрын
In my case I didn't saw any difference in size even after using compression ,,🤔
@mafiacodes
@mafiacodes 4 жыл бұрын
Force refresh the page-shift + reload
@sidharthbhunia2026
@sidharthbhunia2026 4 жыл бұрын
Hey I am using Firefox browser n I noticed that transfer is getting reduced if I use compression n not the size I got it 🤙🤗 thanku for the tutorial bruh 🤘
@sidharthbhunia2026
@sidharthbhunia2026 4 жыл бұрын
And another help bruh , please make a video on async task loader in android please as async task have been deprecated ,soo I want to use async task loader please it will be a great help
@tabaxaddhbi6635
@tabaxaddhbi6635 3 жыл бұрын
HoW To mAkE ApP SuPeR FaST!!!
How to scale NodeJs applications using the cluster module.
13:37
Mafia Codes
Рет қаралды 50 М.
а ты любишь париться?
00:41
KATYA KLON LIFE
Рет қаралды 3,6 МЛН
🩷🩵VS👿
00:38
ISSEI / いっせい
Рет қаралды 28 МЛН
Gli occhiali da sole non mi hanno coperto! 😎
00:13
Senza Limiti
Рет қаралды 22 МЛН
Mastering Memory Management in Node.js: Tips and Tricks for Better Performance
16:06
Software Developer Diaries
Рет қаралды 32 М.
How to prevent a DDoS attack (or a Brute-force attack)
14:11
Mafia Codes
Рет қаралды 28 М.
Node.js is a serious thing now… (2023)
8:18
Code With Ryan
Рет қаралды 642 М.
Scaling your Node.js app using the "cluster" module
13:44
Software Developer Diaries
Рет қаралды 41 М.
Increase Node JS Performance With Thread Pool Management 📊 | OPTIMIZING NODE JS
12:29
Bleeding Code (By John Jardin)
Рет қаралды 15 М.
How to generate and use a SSL certificate in NodeJS
13:59
Mafia Codes
Рет қаралды 107 М.
а ты любишь париться?
00:41
KATYA KLON LIFE
Рет қаралды 3,6 МЛН