Bug 27264 opening/closing java files in presence of hiearchical package explorer is slow
will attach profiles
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/packageview/PackageFragmentProvider.java
try {
			String realParentName= child.getElementName().substring(0,name.lastIndexOf(".")); 
			IJavaElement[] children= new IJavaElement[0];			
			
			if(parent instanceof IPackageFragmentRoot){
				IPackageFragmentRoot root = (IPackageFragmentRoot) parent;
				children= root.getChildren();
			} else if (parent instanceof IJavaProject) {
				IJavaProject project = (IJavaProject) parent;
				children= project.getPackageFragments();
			}
			
			for (int i= 0; i < children.length; i++) {
				IJavaElement element= children[i];
				if(element.getElementName().equals(realParentName))
					return element;
			}
		} catch (JavaModelException e) {
			JavaPlugin.log(e);
		}
		
		return parent;
	}
	/*
	 * @see org.eclipse.jface.viewers.ITreeContentProvider#hasChildren(Object)
	 */
	public boolean hasChildren(Object element) {
		
		if (element instanceof IPackageFragment) {