File size vs http requests

General discussions about Inkscape.
lolli
Posts: 34
Joined: Thu Jul 02, 2015 4:28 am

File size vs http requests

Postby lolli » Fri Sep 04, 2015 8:50 pm

Hi,
I am using a lot of svgs on my website but unfortunately the svgs with paths are quite large in size, even when run through a compressor tool.
I wanted to combine 3 small images in order to reduce http requests but then I noticed that the combined image is much larger than the three small images together(300kb vs 200kb). So would it still make more sense to combine them so that I have less http requests or is the end size more important?

Thank you for your help.

User avatar
Maestral
Posts: 982
Joined: Sat Aug 27, 2011 7:10 am

Re: File size vs http requests

Postby Maestral » Sat Sep 05, 2015 1:20 am

From my experience, svg of 200-300kb can contain a lot inside. If you have some complex drawings inside, and in it aslso depends on what kind of elements we are speaking here, combining would not do much regarding the size.

Try with Vacuum Defs or try Save As - Plain svg.
:tool_zoom: <<< click! - but, those with a cheaper tickets should go this way >>> :!:

lolli
Posts: 34
Joined: Thu Jul 02, 2015 4:28 am

Re: File size vs http requests

Postby lolli » Sat Sep 05, 2015 1:52 am

Hi,
sorry, I don't really understand what you are saying: Are you saying I would be better off using 3 images (together 200kb) instead of one image (300kb) for my website?
I am already using vacum def and saved as plain svg, and also used compression tools.

User avatar
Maestral
Posts: 982
Joined: Sat Aug 27, 2011 7:10 am

Re: File size vs http requests

Postby Maestral » Sat Sep 05, 2015 2:36 am

lolli wrote:... sorry, I don't really understand what you are saying: Are you saying I would be better off using 3 images (together 200kb) instead of one image (300kb) for my website?...


Can`t be sure but it does sounds like a solution. Math would say 3x=200kb => x<70kb in comparison to y=300kb ,)
On the other hand, what kind of speed record you`re after since these amounts should not be a problem for the nowadays web?
:tool_zoom: <<< click! - but, those with a cheaper tickets should go this way >>> :!:

lolli
Posts: 34
Joined: Thu Jul 02, 2015 4:28 am

Re: File size vs http requests

Postby lolli » Sat Sep 05, 2015 2:58 am

Well I have a lot of images on the site, so all these add up. One page is easily 2 mb with all these images and I know that Page speed services like Pingdom and Google always advise you to decrease http requests which I could do if I used less images...but then they would be larger than all the small ones combined...

User avatar
Maestral
Posts: 982
Joined: Sat Aug 27, 2011 7:10 am

Re: File size vs http requests

Postby Maestral » Sat Sep 05, 2015 3:25 am

While we speak of optimisation...

Vectors, when available as a solution, should decrease the size but I can`t be sure why are you having that odd occurance with combining images. One of the factors which increase the svg size is number of nodes, so if you can further simplify these images - it would reduce the size of the image.

Could you post a screen shots of these images? Further coments, while blindfolded, can`t be of much help.
:tool_zoom: <<< click! - but, those with a cheaper tickets should go this way >>> :!:

lolli
Posts: 34
Joined: Thu Jul 02, 2015 4:28 am

Re: File size vs http requests

Postby lolli » Sat Sep 05, 2015 4:17 am

I have 3 of these and would like to combine them to one. Because I use them one a website, I needed to convert the font into a path which of course makes the size much larger.
Attachments
handgefertigte-details.svg
(61.62 KiB) Downloaded 157 times

User avatar
Maestral
Posts: 982
Joined: Sat Aug 27, 2011 7:10 am

Re: File size vs http requests

Postby Maestral » Sat Sep 05, 2015 6:30 am

Well, since it`s all about the font, and site is yours - add/embed the font to the website and svg should be just a few kb`s.

I`ve tried out (within your example - same text, same shape) with some grunge font, and while it was kept as font - 3.14KB
When converted to path - 1.2MB ,)
:tool_zoom: <<< click! - but, those with a cheaper tickets should go this way >>> :!:

lolli
Posts: 34
Joined: Thu Jul 02, 2015 4:28 am

Re: File size vs http requests

Postby lolli » Sat Sep 05, 2015 3:36 pm

I have the font embedded to my site with @fontface but still, when used in svg images only people can see it who have the font installed(when used as text in the svg). That's why I had converted the font to a path. Am I missing something??

User avatar
Maestral
Posts: 982
Joined: Sat Aug 27, 2011 7:10 am

Re: File size vs http requests

Postby Maestral » Sat Sep 05, 2015 6:22 pm

Try with this page as a starting point.
:tool_zoom: <<< click! - but, those with a cheaper tickets should go this way >>> :!:

lolli
Posts: 34
Joined: Thu Jul 02, 2015 4:28 am

Re: File size vs http requests

Postby lolli » Sat Sep 05, 2015 6:34 pm

Hi, thanks for the link but this is what I already have done. I have imported the font via @fontface and declared svg, woff, woff2, truetype, opentype. Still you can only see the correct font in images when you have it installed.

User avatar
Maestral
Posts: 982
Joined: Sat Aug 27, 2011 7:10 am

Re: File size vs http requests

Postby Maestral » Sat Sep 05, 2015 6:52 pm

Not all of the fonts are made properly.
If everything else fails, perhaps changing the font would solve a thing and fortunately, there is a lot of available fonts.
:tool_zoom: <<< click! - but, those with a cheaper tickets should go this way >>> :!:


Return to “General Discussions”