Commit d71ed885 authored by Michael Natterer's avatar Michael Natterer 😴

app: add buffering to reading data files

gimp_data_factory_load_data(): use a GBufferedInputStream so we don't
end up reading files byte-by-byte in the worst case.
parent 26cb87aa
......@@ -894,7 +894,9 @@ gimp_data_factory_load_data (GimpDataFactory *factory,
if (input)
{
data_list = loader->load_func (context, file, input, &error);
GInputStream *buffered = g_buffered_input_stream_new (input);
data_list = loader->load_func (context, file, buffered, &error);
if (error)
{
......@@ -909,6 +911,7 @@ gimp_data_factory_load_data (GimpDataFactory *factory,
gimp_file_get_utf8_name (file));
}
g_object_unref (buffered);
g_object_unref (input);
}
else
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment