Deprecated: Function set_magic_quotes_runtime() is deprecated in /var/www/web1643/html/phpBB3/common.php on line 106
[phpBB Debug] PHP Notice: in file /includes/session.php on line 916: Cannot modify header information - headers already sent by (output started at /common.php:106)
[phpBB Debug] PHP Notice: in file /includes/session.php on line 916: Cannot modify header information - headers already sent by (output started at /common.php:106)
[phpBB Debug] PHP Notice: in file /includes/session.php on line 916: Cannot modify header information - headers already sent by (output started at /common.php:106)

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /var/www/web1643/html/phpBB3/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /var/www/web1643/html/phpBB3/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /var/www/web1643/html/phpBB3/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /var/www/web1643/html/phpBB3/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /var/www/web1643/html/phpBB3/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /var/www/web1643/html/phpBB3/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /var/www/web1643/html/phpBB3/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /var/www/web1643/html/phpBB3/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /var/www/web1643/html/phpBB3/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /var/www/web1643/html/phpBB3/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /var/www/web1643/html/phpBB3/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /var/www/web1643/html/phpBB3/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /var/www/web1643/html/phpBB3/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /var/www/web1643/html/phpBB3/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /var/www/web1643/html/phpBB3/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /var/www/web1643/html/phpBB3/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /var/www/web1643/html/phpBB3/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /var/www/web1643/html/phpBB3/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /var/www/web1643/html/phpBB3/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /var/www/web1643/html/phpBB3/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /var/www/web1643/html/phpBB3/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /var/www/web1643/html/phpBB3/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /var/www/web1643/html/phpBB3/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /var/www/web1643/html/phpBB3/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /var/www/web1643/html/phpBB3/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /var/www/web1643/html/phpBB3/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /var/www/web1643/html/phpBB3/includes/bbcode.php on line 112

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /var/www/web1643/html/phpBB3/includes/bbcode.php on line 112
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 3526: Cannot modify header information - headers already sent by (output started at /common.php:106)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 3528: Cannot modify header information - headers already sent by (output started at /common.php:106)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 3529: Cannot modify header information - headers already sent by (output started at /common.php:106)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 3530: Cannot modify header information - headers already sent by (output started at /common.php:106)
ppsGrid.de • Thema anzeigen - Speicherfehler?

Speicherfehler?

Hier werden Fragen zur Programmierung des ppsGrids...

Speicherfehler?

Beitragvon calisonline am 30.04.2007, 17:09

Hi,

ich habe festgestellt dass das ppsGrid im laufe der Zeit immer mehr Speicher belegt, also je länger das Programm läuft, desto mehr Speicher nimmt es in anspruch.
Jetzt wollte ich mal nachfragen, ob dies ein noch nicht bekanntes Problem ist, oder ob ich es falsch benutze.

Hier mal der code welchen ich benutze bevor/während ich das Grid fülle:

Erstmal wird es komplett geleert:
Code: Alles auswählen
grid1.BeginUpdate()
grid1.Rows.Clear()
grid1.Cols.Clear()


Danach läuft eine "While"-Schleife und führt für jeden Datensatz den folgenden Code aus:
Code: Alles auswählen
grid1.Addrows(1,grid1.rows.Count)
grid1.Cells(0,grid1.rows.Count -1 ).Value = sqlReader.reader.GetString(0)
grid1.Cells(1,grid1.rows.Count -1 ).Value = sqlReader.reader.GetString(1)
grid1.Cells(3,grid1.rows.Count -1 ).Value = sqlReader.reader.GetString(2)
grid1.Cells(2,grid1.rows.Count -1 ).Value = sqlReader.reader.GetString(3)
grid1.Cells(4,grid1.rows.Count -1 ).Value = sqlReader.reader.GetString(4)


Und am dann:
Code: Alles auswählen
grid1.EndUpdate()


Am anfang wird ja jedesmall mit "clear" alles wieder geleert, aber trotzdem nimmt der Speicherverbrauch pro Abfrage um 3-4MB zu, was einfach zuviel ist. Ich hoffe ihr könnt mir weiter helfen, ich möchte nämlich nicht auf fas Grid verzichten, dafür ist es zu gut :D

mfg
Calis[/quote]
calisonline
 
Beiträge: 1
Registriert: 30.04.2007, 16:26

Beitragvon torsten am 07.05.2007, 08:20

Hallo Calis

Tut mir leid, wenn ich mich jetzt erst melde: Bin umgezogen und zur Zeit ohne Internet-Anschluß, dazu zwei Wochen Urlaub...

ber trotzdem nimmt der Speicherverbrauch pro Abfrage um 3-4MB zu, was einfach zuviel ist. Ich hoffe ihr könnt mir weiter helfen
Mmmhh...
Eigentlich kann es nur "Speicherverbrauch" geben, wenn "unmanaged" Resourcen gebraucht werden. Und das geschieht beim ppsGrid nur im Bereich der "Embedded Controls".

Das heißt:
Gibst du den DataReader wieder frei (Disposed) ?
Wie kommst du auf 3-4 MB? (Der Taskmanager ist für die Feststellung des Speicherverbrauchs unter .Net völlig ungeeignet)

ich möchte nämlich nicht auf fas Grid verzichten, dafür ist es zu gut
Danke für das Lob :-)

Gruß Torsten
torsten
Site Admin
 
Beiträge: 92
Registriert: 02.05.2006, 09:04
Wohnort: Bremen


Zurück zu Fragen zur Programmierung

Wer ist online?

Mitglieder in diesem Forum: 0 Mitglieder und 1 Gast

cron