I am using some jquery for a custom module.

My problem is that the $.get method takes almost 2000 ms to execute.
The destination of the $.get method is node, so I guess everything is being loaded if I do that. Should I create a separate php file for get and include in there only the things that I need?

thanks

Comments

katbailey’s picture

Not sure if this is exactly what you're looking for but you could set the url in your $.get call to a path defined in your menu hook which points to a callback function. The callback function would then retrieve the information you require from the node and pass it back to jquery.

drupaldc’s picture

that is not going to solve the problem imho since drupal will have to load all the libraries again if I change the path of $.get.