I'm not sure how Irrlicht handles heightmaps, but as far as I'm concerned having an 1024x1024 heightmap means 2 million triangles... If you really want to have such a large map, you should try implementing a CLOD algorithm like ROAM.
Currently "Level of Detail" is not implemented with terrains, which means there are a ton of triangles. Currently I get better performance creating a TerrainMesh first and then creating an OctTreeSceneNode. Also, Performance really takes a nosedive if the heightmap is larger than 256x256. However the Terrain texture can be 2048x2048 without much of a hit.
Here's how to create the mesh:
There is an unofficial terrain renderer for irrlicht at http://zenprogramming.tripod.com/. It has a handy function to render terrain with less polygons than in the heightmap (ie you can load a 1024x1024 heighmap and then scale the mesh to 50% triangles).
I'm a complete newbie as far as programming goes. I can follow the tutorials pretty well though. I was trying to load a terrain by modifying the quake 3 tutorial. It can load the terrain if I followed the first guests code. I tried your code above but it results in this error
'addTerrainMesh' : cannot convert parameter 1 from 'class irr::scene::IAnimatedMesh *' to 'const char *'
video::IImage* iHeightMap = driver->createImageFromFile("../../media/m43_bump_8bit_8k_sm.jpg");//this works
video::IImage* iTerrain = driver->createImageFromFile("../../media/e43_flat_8k_sm.jpg");//this works
scene::IAnimatedMesh* iTerrainMesh = smgr->addTerrainMesh(iTerrainMesh, iTerrain, iHeightMap); //<---Error is here
scene::ISceneNode* iTerrainNode = smgr->addOctTreeSceneNode(iTerrainMesh);
My 256x256 heightmap is currently taking 30 seconds to load the triangle selector.
I'm trying to remember but I think a 1024x1024 took about 10 minutes to load a triangle selector (for collision detection)