unlimited number of values gets really big I have created a content type with a field inside which can take unlimited number of values. eg a city with the names of its inhabitants.

The problem is that this number can get really big (i.e. 100000).

Up to 5000 people I can edit this node with no problems (apart from the fact that it takes much time to load). But above this number I just get a white screen. 

What should I do in order to be able to edit (e.g. the name of a certain inhabitant) with no problems?

My UI idea would be something like pagination (loading 100 records each time I change the page), but is this possible?
Put the relationship the other way round, ie let every inhabitant be a separate entity that has an entity reference to a city. 

Then you can still display them on a city content view by using an embedded view, such as EVA or Display Suite dynamic field, or using Panels. You can even embed it via a preprocess_node function using view_embed_view, and have pagination on it.

And views will use the inverse relationship just fine.

Look at the wiki entry for Cardinality (data modeling) for more information on this principle.