• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

XF 2.0 Local installation “slow network detected. Fallback font will be used while loading”

Marcus

Well-known member
#1
On my local install without internet access, css.php takes six seconds to load, and I receive the escaped message from this thead title in my console.

How can i disable fetching fonts from internet ? Thanks.
 

Chris D

XenForo developer
Staff member
#2
The only font that we fetch over a CDN is Font Awesome.

I think that should be locally served anyway. But there’s an option to control it in the Admin CP. should come up if you search for “awesome”.
 

Marcus

Well-known member
#3
1507893679203.png
This is my setup. And these are the console messages once I disconnect from internet:

When I connect to internet, these messages are not displayed.
 

Chris D

XenForo developer
Staff member
#5
I can't reproduce the same issue.

If it's finding that fallback font then it is attempting to load the main local fonts first:
Less:
@font-face {
  font-family: 'FontAwesome';
  src: url('{$faPath}/fontawesome-webfont.eot?v=4.7.0');
  src: url('{$faPath}/fontawesome-webfont.eot?#iefix&v=4.7.0') format('embedded-opentype'),
If it's detecting a slow network at that point then there's likely some sort of issue on the local server causing it
 

Marcus

Well-known member
#6
FWIW xdebug doesn't play too nice with XF2 in my experience. It was causing css.php to take ~ 1 second on every pageload, ended up having to disable it (which kinda sucks because it has so many really nice tools). But, this was during the Developer Previews, so maybe something has changed since then
I use xdebug and it may be part of the slowliness I endure ...

Xf2 seems quicker live so I am content though.
 

Mike

XenForo developer
Staff member
#7
If you run in development mode, then the LESS is recompiled on each page (as we need to watch it for changes). For me, this only takes a second or two, though it will depend on your machine.

I have just added some code that will try to use cached LESS compilation provided your templates haven't been changed since the last compilation.
 

Marcus

Well-known member
#9
I use a standard windows 10 install. What I got from this thread here is that you all are lucky to use computers six times as fast as mine :)