Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

openttd takes very long to start on linux (scans every single file in dir) #3949

Closed
DorpsGek opened this issue Jul 15, 2010 · 3 comments
Closed
Labels
flyspray This issue is imported from FlySpray (https://bugs.openttd.org/)

Comments

@DorpsGek
Copy link
Member

cupe opened the ticket and wrote:

Hi

When starting openttd 1.0.2 on recent archlinux, it takes very long to load and uses 100% CPU. I killed it after a while and straced it: Apparently it scans the whole directory that it was started from, looking at every file.

~ % strace openttd
...
stat64("/home/cupe/data/incoming/Bach Complete Works - H\344nssler/Vol.41_Chello solo, Violin solo/CD1_Sonaten & Partiten Violine Solo/08- BWV 1002, Partita f\374r Violine 1- Double, Presto.mp3", {st_mode=S_IFREG|0644, st_size=2736757, ...}) = 0
...

This gives a huge list that apparently contains a stat64() call to every single file in my home directory and subdirectories.

Workaround:

mkdir openttd-temp
cd openttd-temp
openttd
cd ..
rm -r openttd-temp

Reported version: 1.0.2
Operating system: Linux


This issue was imported from FlySpray: https://bugs.openttd.org/task/3949
@DorpsGek
Copy link
Member Author

SmatZ wrote:

It doesn't happen on my system. Perhaps you have a symlink to your home directory somewhere in your ~/.openttd or /usr/share/games/openttd directories? Do you have ~/.openttd directory?


This comment was imported from FlySpray: https://bugs.openttd.org/task/3949#comment8327

@DorpsGek
Copy link
Member Author

Rubidium wrote:

Another workaround is just not having the "data" directory in your working directory, e.g. going to /tmp before starting OpenTTD.

The problem is that this can be considered a bug, but it is also a feature required for portable installations.


This comment was imported from FlySpray: https://bugs.openttd.org/task/3949#comment8328

@DorpsGek
Copy link
Member Author

Rubidium closed the ticket.

Reason for closing: Fixed

In r20166


This comment was imported from FlySpray: https://bugs.openttd.org/task/3949

@DorpsGek DorpsGek added Core flyspray This issue is imported from FlySpray (https://bugs.openttd.org/) labels Apr 7, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
flyspray This issue is imported from FlySpray (https://bugs.openttd.org/)
Projects
None yet
Development

No branches or pull requests

1 participant