Re: [Nautilus-list] Nautilus Performance Analysis
- From: Darin Adler <darin bentspoon com>
- To: Alex Larsson <alexl redhat com>
- Cc: <nautilus-list lists eazel com>, Alan Cox <alan lxorguk ukuu org uk>
- Subject: Re: [Nautilus-list] Nautilus Performance Analysis
- Date: Tue, 14 Aug 2001 11:16:39 -0700
On Tuesday, August 14, 2001, at 11:07 AM, Alex Larsson wrote:
The problem is in eel_scalable_font_new ():
EelScalableFont *
eel_scalable_font_new (const char *file_name)
{
EelScalableFont *font;
gpointer font_handle_as_pointer;
RsvgFTFontHandle font_handle = -1;
g_return_val_if_fail (eel_strlen (file_name) > 0, NULL);
g_return_val_if_fail (eel_font_manager_file_is_scalable_font
(file_name), NULL);
initialize_global_stuff_if_needed ();
The eel_font_manager_file_is_scalable_font() call results in a call to
gnome-vfs mimetype magic sniffing that opens the file and reads the
beginning of it.
Such a test is completely inappropriate for g_return_val_if_fail, if it
results in I/O. We ought to fix this egregious mistake even if we also
solve the real problem with your patch. The best fix is to simply remove
this line.
Here is my patch for this:
The patch looks great. Please commit it (and the removed line) on both
branches if you would.
Your use of (!x) goes against the Nautilus coding style (used for Eel)
which requires (x == NULL), but perhaps we can stop trying to be
consistent about that. I don't feel strongly about it.
-- Darin
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]